if you are writing this in a trigger condition field try using "AND" to separate the two conditions. also try using <= instead of <
failing that you could put in the player init:
men1 = []; men2 = []
and then in the init of each man in the groups
men1 = men1 + [this]
or
men2 = men2 +[this]
then make the condition:
(men1 <= 2) AND (men2 <= 2)
no guarantees on the syntax but something like that...
ppl, feel free to correct me