Ave !!!
I am new here but I dare say that a phalanx in most cases couldnt outmanuver the legions, because the phalanx was so rigid. The phalanx usually just went forward because if they manuvered they qickly got out off formation.
Post scriptum: Sorry about my english, I`m from Sweden