403026: GYM100971 G Repair

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

G. Repairtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output

Alex is repairing his country house. He has a rectangular metal sheet of size a × b. He has to cut two rectangular sheets of sizes a1 × b1 and a2 × b2 from it. All cuts must be parallel to the sides of the initial sheet. Determine if he can do it.

Input

The first line contains two space-separated integers a and b (1 ≤ a, b ≤ 109) — the sizes of the initial sheet.

The second line contains two space-separated integers a1 and b1 (1 ≤ a1, b1 ≤ 109) — the sizes of the first sheet to cut out.

The third line contains two space-separated integers a2 and b2 (1 ≤ a2, b2 ≤ 109) — the sizes of the second sheet to cut out.

Output

Output «YES» (without quotes), if it's possible to cut two described sheets from the initial sheet, or «NO» (without quotes), if it's not possible.

ExamplesInput
12 20
14 7
5 6
Output
YES
Input
12 20
11 9
20 7
Output
NO

加入题单

上一题 下一题 算法标签: