Time

13:07:56
23 May 2012
Version for print

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.


Specifications

   Input

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

   Output

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


Problem information

Time Limit: 1 seconds
Memory Limit: 64 MB
Balls for the passed test: 10
Complexity: 20% 556/695
Classes: If... then...

Example

Example input

5 7 4 6 8

Example output

1


← Pirates and coins Problems The Garland →