Ten teams play a complete round-robin tournament. Every pair of distinct teams plays exactly once, so each team plays 9 matches and there are 45 matches in total.
In each match, the winner receives 3 points, both teams receive 1 point in a draw, and the loser receives 0 points.
After the tournament, only the final scores of the ten teams remain. Determine whether there exists an assignment of results to all 45 matches that produces exactly these scores.
The input is given from Standard Input in the following format:
For each test case, print YES if the given scores can be realized by some set of match results, and print NO otherwise.
Each case is given in the following format: