logo AlgoBeat OnlineJudge
登录 注册

#206218. [NWRRC 2014] Grave

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

题目描述

Gerard develops a Halloween computer game. The game is played on a rectangular graveyard with a rectangular chapel in it. During the game, the player places new rectangular graves on the graveyard. The grave should completely fit inside graveyard territory and should not overlap with the chapel. The grave may touch borders of the graveyard or the chapel.

Gerard asked you to write a program that determines whether it is possible to place a new grave of given size or there is no enough space for it.

输入格式

The first line of the input file contains two pairs of integers: — coordinates of bottom left and top right corners of the graveyard. The second line also contains two pairs of integers — coordinates of bottom left and top right corners of the chapel.

The third line contains two integers — width and height of the new grave Side with length should be placed along OX axis, side with length — along OY axis.

输出格式

The only line of the output file should contain single word: Yes, if it is possible to place the new grave, or No, if there is not enough space for it.

样例

样例输入 1

1 1 11 8
2 3 8 6
3 2

样例输出 1

Yes

样例输入 2

1 1 11 8
2 3 8 6
4 3

样例输出 2

No

数据范围与提示

Time limit: 2 s, Memory limit: 256 MB.