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

13733번 - Square Deal 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 512 MB119837971.818%

문제

Given the dimensions of three rectangles, determine if all three can be glued together, touching just on the edges, to form a square. You may rotate the rectangles. For example, Figure C.1 shows successful constructions for the first two sample inputs.

Figure C.1: Constructions for the first two examples

입력

The input consists of three lines, with line j containing integers Hj and Wj , designating the height and width of a rectangle, such that 100 ≥ Hj ≥ Wj ≥ 1, and such that H1 ≥ H2 ≥ H3.

출력

Output a line saying YES if they can be glued together to form a square. Output NO otherwise.

제한

예제 입력 1

7 3
7 1
7 3

예제 출력 1

YES

예제 입력 2

9 2
7 4
7 5

예제 출력 2

YES

예제 입력 3

3 1
3 2
3 3

예제 출력 3

NO

힌트

출처

ICPC > Regionals > North America > Mid-Central Regional > 2016 Mid-Central Regional Programming Contest C번

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

출처

대학교 대회

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

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