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?
Input

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.

Output

Output "YES" or "NO", depending on it is possible to make a table with the given design or not.

ExamplesInput
1 1 1 1
Output
YES
Input
1 5 1 5
Output
YES
Input
1 3 2 2
Output
YES
Input
9 5 11 8
Output
NO

加入题单

算法标签: