eolymp
Competitions

Week 2 Conditionals Part 2

Tourist

Time limit 1 second
Memory limit 128 MiB

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[1] kilograms and accommodates b[1] people, the second tent weighs a[2] kilograms and accommodates b[2] people, the third tent weighs a[3] kilograms and accommodates b[3] people.

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 data

The first line contains two integers k and w (1k15, 1w30). The second line contains six integers: a[1], b[1], a[2], b[2], a[3], b[3] (1a[1], a[2], a[3]10, 1b[1], b[2], b[3]15).

Output data

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

Examples

Input example #1
10 10
5 5 6 6 4 5
Output example #1
YES
Input example #18
12 3
2 11 5 13 2 8
Output example #18
NO