Determine if it is possible to produce two triangles of given side lengths, by cutting some rectangle with a single line segment.
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 whether there exists a rectangle which could have been cut to form triangles of the
given side lengths. If such a rectangle exists, print “
Sample Input 1
Output for Sample Input 1
Sample Input 2
Output for Sample Input 2
Sample Input 3
Output for Sample Input 3
|University of Debrecen; Faculty of Informatics; v. 03/01/2019|