CF1230A.Dawid and Bags of Candies
普及/提高-
通过率:0%
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
Dawid has four bags of candies. The i -th of them contains ai candies. Also, Dawid has two friends. He wants to give each bag to one of his two friends. Is it possible to distribute the bags in such a way that each friend receives the same amount of candies in total?
Note, that you can't keep bags for yourself or throw them away, each bag should be given to one of the friends.
输入格式
The only line contains four integers a1 , a2 , a3 and a4 ( 1≤ai≤100 ) — the numbers of candies in each bag.
输出格式
Output YES if it's possible to give the bags to Dawid's friends so that both friends receive the same amount of candies, or NO otherwise. Each character can be printed in any case (either uppercase or lowercase).
输入输出样例
输入#1
1 7 11 5
输出#1
YES
输入#2
7 3 2 5
输出#2
NO
说明/提示
In the first sample test, Dawid can give the first and the third bag to the first friend, and the second and the fourth bag to the second friend. This way, each friend will receive 12 candies.
In the second sample test, it's impossible to distribute the bags.