You are given three rectangles. Determine if it is possible to arrange the three rectangles, perhaps with rotation, to form a square without the rectangles overlapping.
Constraints
The lengths and widths of the rectangles are positive integers between
Input Specification
The input consists of three lines. Each of the three lines contains two positive integers, the length and width of one of the rectangles.
Output Specification
Print, on a single line, YES
if it is possible to form a square.
Print, on a single line, NO
otherwise.
Sample Input
Copy
8 2
1 6
7 6
Sample Output
Copy
YES
Comments