406846: GYM102569 K Table
Memory Limit:256 MB
Time Limit:2 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
K. Tabletime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output
There are 4 bars, possibly, having different lengths. Can they be used as the legs of the table, such that:
- The legs stay vertically in the vertices of some rectangle;
- The surface of the table, possibly, sloping, touches all four legs?
The input contains 4 integers $$$a_1$$$, $$$a_2$$$, $$$a_3$$$, $$$a_4$$$ ($$$1 \le a_i \le 10^9$$$) — the lengths of the bars.
OutputOutput "YES" or "NO", depending on it is possible to make a table with the given design or not.
ExamplesInput1 1 1 1Output
YESInput
1 5 1 5Output
YESInput
1 3 2 2Output
YESInput
9 5 11 8Output
NO