Hungary and Poland to lose quarter of EU funds