
Determine whether it is possible to obtain two triangles with the given side lengths by making a single straight cut in some rectangle, and then freely rotating and flipping the resulting pieces.
The input consists of two lines. The first line contains three space-separated positive integers, representing the desired side lengths of the first triangle. The second line contains three space-separated positive integers, representing the side lengths of the second triangle. It is guaranteed that the provided side lengths form valid triangles. All side lengths are less than or equal to .
Print YES if there exists a rectangle that can be cut in such a way to obtain triangles with the given side lengths. Otherwise, print NO.
Example 1
Example 3