By Carlos de Salles, UFMA Brazil
In your free time, you decided to balance four packages on a scale. The following Figure illustrates the scale you are using, which has two plates. To be able to balance, you need to put the same weight on the left plate as on the right.
Your task is, given the four packages weights, inform if you can put all four packages on plates in a way that the scale is balanced. You can try any configuration of the four packages on the two plates for this (not just two packages on each plate).
The input consists of four lines, each of them informing the weight of one of the four packages. The weight of a package is reported as a real number to one decimal place, ranging from 0.1 to 30.0.
The output must be YES, if there is any way to organize the four packages or NO for the opposite.
Input Samples | Output Samples |
3.0 |
YES |
35.4 |
NO |
5.4 |
YES |