We’re preparing your current view and syncing the latest data.
You are given three integers representing lengths of segments. You need to determine if these three segments can form a valid triangle. A valid triangle satisfies the triangle inequality: the sum of lengths of any two sides must be strictly greater than the length of the remaining side.
Three integers a, b, c separated by spaces, where each represents the length of a segment.
Print "YES" if the segments can form a valid triangle, otherwise print "NO".
1 ≤ a, b, c ≤ 1000
Example 1
Input
3 4 5
Output
YES
Explanation
All pair sums are greater than the third side: 3+4=7>5, 4+5=9>3, and 3+5=8>4.
Example 2
Input
1 10 12
Output
NO
Explanation
1 + 10 is not greater than 12, so the segments cannot form a triangle.