LearnPy Hub
← Arena
EasyRating 900

Is the Final Fair?

Four players with different skills play semi-finals 1 vs 2 and 3 vs 4; the more skilled always wins. The final is fair if the two best players meet in it. Print YES or NO.

Input

Four distinct integers s1 s2 s3 s4.

Output

YES or NO.

Sample 1

Input
3 7 9 5
Output
YES

Sample 2

Input
4 5 6 9
Output
NO
solution.py
Output appears here
Is the Final Fair? · Python Arena problem · LearnPy Hub