Valid Pair Problem Code: SOCKS1


Read problem statements in Bengali, Mandarin Chinese, Russian, and Vietnamese as well.

Chef has three socks in his drawer. Each sock has one of  possible colours, which are represented by integers between  and . Specifically, the colours of the socks are , , and .

Chef has to wear two socks which have the same colour. Help Chef find out if that is possible or not.


The first and only line of the input contains three space-separated integers , and .


Print a single line containing the string "YES" if it is possible for Chef to wear two socks with the same colour or "NO" if it is impossible (without quotes).

You may print each character of each string in uppercase or lowercase (for example, the strings "yEs", "yes", "Yes" and "YES" will all be treated as identical).



Subtask #1 (100 points): original constraints

Example Input 1

5 4 3

Example Output 1



Since there are no two socks with the same colour, Chef cannot wear a pair of socks with the same colour.

Example Input 2

5 5 5

Example Output 2



Since all three socks have the same colour, Chef can wear a pair of socks with the same colour.


Popular posts from this blog

How to pass parameters in webhook?

Access and modify all the resources of our Wiki.js using WikiJS API

Fahrenheit to Celsius