The Polish and Czech presidents have agreed that all steps taken inside the European Union must be within the limits of the treaties.