Attention — This is the easy version of the problem SuperLiga.
Task
A ranking line of the form — (matches, victories, draws, defeats, points) is given, this ranking line corresponding to the results of a team throughout a competitive season in a football league in Southeast Europe.
Now B.B.C, a specialist in the field, wants to know if the given configuration is valid according to football rules ( points for a victory, point for a draw, points for defeats).
Input data
The first line will contain the number of tests .
Each of the next lines will contain a configuration in the format described in the statement, each of the 5 positions containing a natural number representing the corresponding number for that position.
Output data
Each line will contain YES
if the configuration is correct, or NO
otherwise.
Constraints and clarifications
# | Score | Constraints |
---|---|---|
1 | 0 | Example |
2 | 50 | |
3 | 50 | No additional constraints |
Example
stdin
10
11 8 1 2 25
9 4 4 3 16
5 0 5 0 5
58 28 10 20 94
10 4 0 6 12
685 684 0 1 2052
10 4 3 3 15
10 1 3 6 5
6 0 3 3 3
11 1 8 2 10
stdout
YES
NO
YES
YES
YES
YES
YES
NO
YES
NO
Explanation
For example, in the last test, the number of points obtained is , not .