Given four integers, two of them add up to the same as the other two

Write a program that reads four integers and determines if the sum of
two of them equals the sum of the other two.

Input

Four integers in a line.

Output

If two integers of the four add up to the same sum as the other two, the
output will be YES followed by a newline character. Otherwise the output
is NO followed by a newline character.

Observation

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

Problem information

Author: PRO1

Generation: 2026-01-25T22:05:30.223Z

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