Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/if-gisht-teshikdan

Will the brick fit through?

Medium 1000 ms 64 MB 45%
Share

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.

Checking whether a brick fits through a rectangular 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

Sign in to submit a solution

Signing up is free and takes a minute.