P25360 [AtCoder] Colored Balls
普及+
题目描述

Problem Description

Initially, the box contains $ X $ red balls and $ Y $ blue balls.

Takahashi wants to empty the box by repeating the following operations:

  • Remove $ 1 $ red ball and $ 3 $ blue balls from the box.

Or,

  • Remove $ 3 $ red balls and $ 1 $ blue ball from the box.

Each operation can be either of these two, and it is not necessary to perform the same operation every time.

Determine if it is possible for Takahashi to empty the box.

Input Format

The input is given from the standard input in the following format:

$ X $ $ Y $

Output Format

Output Yes if it is possible to empty the box, otherwise output No.

Sample Input and Output

Sample Input #1

3 1

Sample Output #1

Yes

Sample Input #2

1 2

Sample Output #2

No

Sample Input #3

4 4

Sample Output #3

Yes

Notes/Hints

Constraints

  • $0 \leq X, Y \leq 10^9$
  • $ X + Y > 0 $
  • All inputs are integers.

Sample Explanation 1

It is possible to empty the box in one operation.

Sample Explanation 2

Neither operation can be performed.

Sample Explanation 3

For example, the box can be emptied in two operations as follows: In the first operation, remove $ 1 $ red ball and $ 3 $ blue balls from the box. In the second operation, remove $ 3 $ red balls and $ 1 $ blue ball from the box.

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
3 1
样例输出
Yes