P29500 [洛谷] [NEERC2017] Box
提高-
题目描述

Problem Description

Bella is working in a factory that produces boxes. All boxes are in the shape of rectangular parallelepipeds. A net of the corresponding parallelepiped is cut out of a flat rectangular piece of cardboard of size \( w \times h \). This net is a polygon with sides parallel to the sides of the rectangle of the cardboard. The net is bent along several lines and is connected along the edges of the resulting parallelepiped to form a box. The net is bent only along the edges of the resulting box.

Example Image 1

Example Image 2

The first example

The third example

Bella is a software developer and her task is to check whether it is possible to make a box of size \( a \times b \times c \) out of a cardboard of size \( w \times h \). Bella did write a program and boxes are being produced. Can you do the same?

Input Format

The first line contains three integers \( a \), \( b \), and \( c \) -- the dimensions of the box.

The second line contains two integers \( w \) and \( h \) -- the width and the height of the cardboard.

All integers are positive and do not exceed \( 10^8 \).

Output Format

Print Yes if it is possible to cut a box \( a \times b \times c \) out of a cardboard of size \( w \times h \). Print No otherwise.

Sample Input and Output

Sample Input #1

1 2 3
6 5

Sample Output #1

Yes

Sample Input #2

1 2 3
5 5

Sample Output #2

No

Sample Input #3

1 1 1
10 2

Sample Output #3

Yes

Notes/Hints

Time limit: 3 s, Memory limit: 512 MB.

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
1 2 3 6 5
样例输出
Yes