402355: GYM100738 A Fitting boxes
Description
Programming is fun, but programmers usually don't like geometry problems, though they are often part of the programming competitions. Jonas participated in a programming competition yesterday and one of the problems that he hadn't solved was a geometry problem. Jonas is a very stubborn programmer, and he always works hard to solve the problems he didn't solve in a contest. Certainly, Jonas was able to solve the problem when he got home after a while, but let's see if you can do it better than Jonas today. In this problem you are given 2 rectangles and you need to find if you can fit one of them into the other. The dimensions (A1, B1), (A2, B2) of the rectangles are given. Rectangles can be rotated, if necessary, in order to fit them. The width of the sides of the rectangles is negligible. The rectangle inside can coincide with the outer rectangle sides, for example 1 x 1 rectangle fits inside 2 x 1.
InputEach test case contains 4 positive integers separated by a space character, A1 ≤ 103, B1 ≤ 103, A2 ≤ 103, B2 ≤ 103.
OutputOutput "Yes" if it's possible to fit one box into another, or "No" if it's not possible.
ExamplesInput4 4 4 4Output
YesInput
20 1 1 10Output
YesInput
10 10 5 16Output
NoInput
10 10 11 1Output
YesInput
100 100 200 1Output
No