why don't you use the least common multiple between the number of men in the iphicratean phalanx and the number of men in the legion? then use as many units as required on each side.