Program time limit: 1 second
Program memory limit: 512 MB
"In a group of three people, there will always be someone I can learn from." - Confucious.
Cyril took his words for it, and he and his two buddies, Frank and Morthak the destroyer, have returned from a magical adventure, making massive amount of money.
Currently, Frank and Morthak the destoyer each carries a bag of money.
As they are about to split, they run into a problem: can their money be distributed evenly among the three people?
Output YES if an even three-way split is possible, and NO otherwise.
You should read from standard input.
For all test cases:
Output YES if the total amount can be split evenly among the three people, and NO otherwise.
5
3
NO
5
4
YES
You will be awarded proportional marks for your tasks.
The contest ended at 8:45 p.m. AEST on Tuesday 7th April. All submissions will be unofficial officially.
Log in to submit!