# Week 2: November 16 – 22. Conditional statement. Part 2

# Tourist

John is going to a tourist meeting of pupils in his school. In his class he was made responsible for the tents. At home he found **3** tents: the first one weighs `a`

kilograms and accommodates _{1}`b`

people, the second tent weighs _{1}`a`

kilograms and accommodates _{2}`b`

people, the third tent weighs _{2}`a`

kilograms and accommodates _{3}`b`

people._{3}

There are **k** pupils in John's class. Find out if John can choose tents such that all people can fit in them. Take into account that the selected tents should weigh no more than **w** kilograms in total.

#### Input

The first line contains two integers **k** and **w** (**1** ≤ **k** ≤ **15**, **1** ≤ **w** ≤ **30**). The second line contains six integers: `a`

, _{1}`b`

, _{1}`a`

, _{2}`b`

, _{2}`a`

, _{3}`b`

(_{3}**1** ≤ `a`

, _{1}`a`

, _{2}`a`

≤ _{3}**10**, **1** ≤ `b`

, _{1}`b`

, _{2}`b`

≤ _{3}**15**).

#### Output

Print **YES** if it is possible to choose tents as desired, and **NO** otherwise.

10 10 5 5 6 6 4 5

YES