favorite We need a little bit of your help to keep things running, click on this banner to learn more

New case

New case

The size of the rectangular door a, b are given, and the size of the cabinet, which is shaped like a cuboid x, y, z. Is it possible to carry through the closet door, if allowed to carry it so that each edge of the cabinet was parallel or perpendicular to each side of the door.


Five real numbersa, b, x, y, z (0 < a, b, x, y, z < 10).


Print 1, if the cabinet can be free carried through the door, and 0 otherwise.

Time limit 1 second
Memory limit 64 MiB
Input example #1
5 7 4 6 8
Output example #1