C(12,3)×C(9,5)×C(4,4) = 220×126×1 = 27720
Notice that it won't matter what order you place them on the teams,
because you get the same answer, regardless:
C(12,3)×C(9,4)×C(5,5) = 220×126×1 = 27720
C(12,5)×C(7,3)×C(4,4) = 792×35×1 = 27720
C(12,5)×C(7,4)×C(3,3) = 792×35×1 = 27720
C(12,4)×C(8,3)×C(5,5) = 495×56×1 = 27720
C(12,4)×C(8,5)×C(3,3) = 495×56×1 = 27720
Edwin