You can't have two Betta males in a tank together or a male and a female together. Make or buy a divider and then you can have one in each half, then it doesn't matter what sex they are. Make sure the divider is higher than the water and flush with the tank lid so that they can't jump over it to get to each other.
Edit> for typo's