~/algor $ cat problems/if-gisht-teshikdan
Will the brick fit through?
Medium
1000 ms
64 MB
45%
A brick shaped as a rectangular box with dimensions $a$, $b$ and $c$ and a rectangular hole in a wall of size $d$ by $e$ are given. The brick may be turned in any way, but while passing through the hole its edges are parallel to the sides of the hole. The brick passes even if its side equals a side of the hole. Determine whether the brick can pass through the hole.
Input
One line with five positive integers: $a$, $b$, $c$, $d$ and $e$.
Output
One word: ha (yes) or yo'q (no).
Note
$1 \le a, b, c, d, e \le 10^{9}$
Examples
Input #1
2 5 3 3 4
Output #1
ha
Input #2
2 5 3 1 4
Output #2
yo'q