What species? With most rainbowfish, it's very easy to tell. Males are colorful, females aren't. Some are different colors.
They're probably both male - rainbowfish probably should be kept in groups of 5 or more, with two or more females to each male. If you can't tell, they probably are male.
Have a proper school, and they breed on their own. They'll lay eggs constantly, but the fry grow really slow. You'll need tons of tanks because of the slow rate of growth, and the numbers, and you'll need at LEAST a 55g with NO other fish, except maybe bottom swimmers for just 5 of the larger rainbows. I suggest at least a 75g tank though.