[BOJ 14418] Three Square

View as PDF

Submit solution

Points: 2
Time limit: 1.0s
Memory limit: 512M

Problem types
Allowed languages
Assembly, Awk, C, C++, Java, Pascal, Perl, Python, Sed, Text

Inspired by a Mondrian painting you saw, you want to make a three-pane window out of three colored rectangles of glass. You are given the sizes of the three panes of glass. Can you arrange them into a square? You may rotate the panes, but the panes may not overlap.

입력 형식

The input consists of three lines. Each of the three lines gives the length and height of a pane of glass.</p>

It is guaranteed that the lengths and heights are integers between 1 and 100, inclusive.

출력 형식

Print, on a single line, YES if the panes of glass can be combined to form a square; otherwise, print NO.

예제 입력

8 2
1 6
7 6

예제 출력

YES

Comments

There are no comments at the moment.