What determines the numeral’s gender?

Number Nouns: Rules from One to One Thousand