Question
Ratio Quest
Kael has an array B of size 4. In one move, he can swap any two elements. Determine if, after any number of swaps, it’s possible to arrange B such that B0 : B1 equals B2 : B3.
Input
First and the only line of the input contains 4 integers.
Constraints
1 ≤ Bi ≤ 104
Constraints
1 ≤ Bi ≤ 104
Output
Print "YES" if it is possible for us to satisfy the above condition after a finite number of moves, else print "NO", without the quotes.
Example
Sample Input
2 5 15 6
Sample Output
YES
Explanation
We can arrange the 4 numbers as follows: [2, 6, 5, 15]
Now, 2 : 6 = 1 : 3
5 : 15 = 1 : 3
As the final ratios come out to be equal, it is possible.
2 5 15 6
Sample Output
YES
Explanation
We can arrange the 4 numbers as follows: [2, 6, 5, 15]
Now, 2 : 6 = 1 : 3
5 : 15 = 1 : 3
As the final ratios come out to be equal, it is possible.