Logo
(追記) (追記ここまで)

10378번 - Grave 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 256 MB174918553.797%

문제

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: x1, y1, x2, y2 (−109 ≤ x1 < x2 ≤ 109; −109 ≤ y1 < y2 ≤ 109) — coordinates of bottom left and top right corners of the graveyard. The second line also contains two pairs of integers x3, y3, x4, y4 (x1 < x3 < x4 < x2; y1 < y3 < y4 < y2) — coordinates of bottom left and top right corners of the chapel.

The third line contains two integers w, h — width and height of the new grave (1 ≤ w, h ≤ 109). Side with length w should be placed along OX axis, side with length h — 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

힌트

출처

ICPC > Regionals > Northern Eurasia > Northwestern Russia Regional Contest > NEERC Northern Subregional 2014 G번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /