logo AlgoBeat OnlineJudge
登录 注册

#206110. [NEERC 2017] Box

内存限制:512 MiB 时间限制:3000 ms 标准输入输出
题目类型:VJudge(洛谷) 评测方式:VJudge
上传者: 匿名

题目描述

Bella is working in a factory that produces boxes. All boxes are in a shape of rectangular parallelepipeds. A net of the corresponding parallelepiped is cut out of a flat rectangular piece of cardboard of size *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.

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 out of a cardboard of size . Bella did write a program and boxes are being produced. Can you do the same?

输入格式

The first line contains three integers a , , and -- the dimensions of the box.

The second line contains two integers and -- the width and the height of the cardboard.

All integers are positive and do not exceed

输出格式

Print Yes if it is possible to cut a box a out of a cardboard of size . Print No otherwise.

样例

样例输入 1

1 2 3
6 5

样例输出 1

Yes

样例输入 2

1 2 3
5 5

样例输出 2

No

样例输入 3

1 1 1
10 2

样例输出 3

Yes

数据范围与提示

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