Divvying Up
시간 제한: 2000ms메모리 제한: 512MB출처: UKIEPC 2020BOJ 20332
문제
A solid competitive programming team can rack up a lot of prize money. Knowing how strong your team is, you are certain to win a lot of contests, so you had better sit down now and check that everybody will receive the same fair distribution of winnings.
You will participate in multiple contests, and at the end of each one receive a set amount of prize money. You can distribute any amount to each of the three members of your team each time, but by the end everyone must have the same amount of total winnings.
Can you distribute the winnings such that everyone gets an equal amount by the end?
입력
- One line containing the number of contests, ().
- One line containing the prize purse for each contest, ().
출력
Output yes if the winnings can be distributed equally between three contestants, otherwise no.
예제
예제 1
입력
2 10 3
출력
no
예제 2
입력
3 9 8 7
출력
yes
코드를 제출하려면 로그인하세요.