15680 ways
Its obvious that number of girls= 16, boys= 15
Number 0, 2 and 4 in the teams excluded. So teams can be formed as 1 or 3 of the same gender:
1 boy + 3 girls -> Combination 1 of 15 x Combination 3 of 16 = 15 x 560 = 8400
3 boys + 1 girl -> Combination 3 of 15 x Combination 1 of 16 = 455 x 16 = 7280
total -> 8400+7280=15680