Cyrils Money

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.

Input

  • The first line of input contains a decimal integer $N$, the amount of money Frank has.
  • The second line of input contains a decimal integer $M$, the amount of money Morthak the destroyer has.

You should read from standard input.

Constraints

For all test cases:

  • $0 \le N, M \le 10^{10^{5}}$.

Output

Output YES if the total amount can be split evenly among the three people, and NO otherwise.

Sample Input 1

5
3

Sample Output 1

NO

Sample Input 2

5
4

Sample Output 2

YES

Scoring

You will be awarded proportional marks for your tasks.


Submit unofficially

The contest ended at 8:45 p.m. AEST on Tuesday 7th April. All submissions will be unofficial officially.

Log in to submit!