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

11596번 - Triangle 다국어

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

문제

Determine if it is possible to produce two triangles of given side lengths, by cutting some rectangle with a single line segment, and freely rotating and flipping the resulting pieces.

입력

The input consists of two lines. The first line contains three space-separated positive integers, indicating the desired side lengths of the first triangle. Similarly, the second line contains three space-separated positive integers, denoting the desired side lengths of the second triangle. It is guaranteed that the side lengths produce valid triangles. All side lengths are less than or equal to 100.

출력

Print, on a single line, whether there exists a rectangle which could have been cut to form triangles of the given side lengths. If such a rectangle exists, print YES. Otherwise, print NO.

제한

예제 입력 1

3 4 5
4 3 5

예제 출력 1

YES

예제 입력 2

3 4 6
4 6 3

예제 출력 2

NO

예제 입력 3

39 52 65
25 60 65

예제 출력 3

NO

힌트

출처

ICPC > Regionals > North America > Pacific Northwest Regional > 2015 Pacific Northwest Region Programming Contest > Division 1 D번

ICPC > Regionals > North America > Pacific Northwest Regional > 2015 Pacific Northwest Region Programming Contest > Division 2 T번

ICPC > Regionals > North America > Southeast USA Regional > 2015 Southeast USA Regional Programming Contest > Division 2 K번

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

출처

대학교 대회

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

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