Given four integers, check that two of them are equal and the other two are different

Write a program that reads four integers and determines if two of them are equal and the remaining ones are different from any other.

Input

Four integers in one line.

Output

If two integers in the input are equal to each other and the other two are different from any other one then print YES. Otherwise, print NO.

Observation

You cannot use massive storage data structures, such as string or vector.

Problem information

Author: PRO1

Generation: 2026-01-25T14:57:27.068Z

© Jutge.org, 2006–2026.
https://jutge.org