262 传统题

[CF2290A] 石子堆 (Stone Piles)

时间限制
1000ms
内存限制
256MiB
登顶 / 尝试
2/ 2
难度
1

[CF2290A] 石子堆 (Stone Piles)

Problem Statement

There are three piles of stones containing aa, bb, and cc stones, respectively.

You must perform exactly one operation: pick one pile, remove 11 stone from it, and place that stone onto one of the other two piles. You cannot skip this move, and you cannot make more than one move.

Determine whether it is possible for all three piles to have an equal number of stones after this single operation.

Input

The first line contains a single integer tt (1≤t≤10001 \le t \le 1000) — the number of test cases.

Each test case consists of a single line containing three integers a,b,ca, b, c (1≤a≤b≤c≤101 \le a \le b \le c \le 10).

Output

For each test case, print "YES" if it is possible to equalize all three piles in one move, and "NO" otherwise. Case-insensitive matching is enabled.

Example

6
1 2 3
2 2 2
3 4 5
1 1 4
8 9 10
3 5 7
YES
NO
YES
NO
YES
NO

Note

  • Case-insensitive YES/NO judge is enabled.
  • Constraints: 1≤t≤10001 \le t \le 1000, 1≤a≤b≤c≤101 \le a \le b \le c \le 10.
  • Source: Codeforces 2290A · Stone Piles