phalanxes would be needed but as i understand it you will still have big problems, try attacking the elephants with flaming arrows and attack them with troops from all the sides perhaps you can rout them.