Repovive
  • Dashboard
  • Ranking
  • Submissions
  • Discussion
  1. Contests
  2. Premier Round 2
  3. 3A

My submissions

/
/
/
/

Announcements

My submissions

/
/
/
/

Announcements

Solve
Author

3A. Alice = Bob

500 pts·1s·256 MB

Input

Output

Samples

Input
t
4
Case 1
7 3 4
Case 2
7 3 3
Case 3
7 8 5
Case 4
8 3 6
Explanation
Case 1

Give all 444 apples to Bob.

Case 2

It is impossible.

Case 3
Case 4

It is impossible.

Output
Case 1
Yes
Case 2
No
Case 3
Yes
Case 4
No

You are given three integers aaa, bbb, and ccc.

Alice initially has aaa apples and Bob initially has bbb apples. You also have ccc additional apples, and each of these ccc apples must be given to exactly one of them (either Alice or Bob).

For each test case, determine whether it is possible to distribute the ccc apples so that finally Alice and Bob have the same number of apples.

Constraints

  • 1≤t≤1031 \le t \le 10^31≤t≤103
  • 0≤a,b,c≤1090 \le a, b, c \le 10^90≤a,b,c≤109
ttt abc}×t\left. \begin{array}{l} a \quad b \quad c \end{array} \right\} \times tabc​}×t

ans}×t\left. \begin{array}{l} \text{ans} \end{array} \right\} \times tans​}×t

where ans\text{ans}ans is either Yes or No.

Give 333 apples to Alice and 222 apples to Bob.