[CF2290A] 石子堆 (Stone Piles)
Problem Statement
There are three piles of stones containing , , and stones, respectively.
You must perform exactly one operation: pick one pile, remove 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 () — the number of test cases.
Each test case consists of a single line containing three integers ().
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/NOjudge is enabled. - Constraints: , .
- Source: Codeforces 2290A · Stone Piles