You are playing another PC game in which you need to battle beasts. In a prison you are attempting to clear, you met three beasts; the first of them has a wellbeing focuses, the second has b wellbeing focuses, and the third has c. To kill the beasts, you can utilize a gun that, when discharged, bargains 1 harm to the chose beast. Each 7-th (I. e. shots with numbers
Control structures
Control structures are block of statements that analyze the value of variables and determine the flow of execution based on those values. When a program is running, the CPU executes the code line by line. After sometime, the program reaches the point where it has to make a decision on whether it has to go to another part of the code or repeat execution of certain part of the code. These results affect the flow of the program's code and these are called control structures.
Switch Statement
The switch statement is a key feature that is used by the programmers a lot in the world of programming and coding, as well as in information technology in general. The switch statement is a selection control mechanism that allows the variable value to change the order of the individual statements in the software execution via search.
Correct answer will be upvoted else Multiple Downvoted. Computer science.
You are playing another PC game in which you need to battle beasts. In a prison you are attempting to clear, you met three beasts; the first of them has a wellbeing focuses, the second has b wellbeing focuses, and the third has c.
To kill the beasts, you can utilize a gun that, when discharged, bargains 1 harm to the chose beast. Each 7-th (I. e. shots with numbers 7, 14, 21 and so on) gun fired is upgraded and bargains 1 harm to all beasts, not only one of them. In case some beast's present measure of wellbeing focuses is 0, it can't be designated by an ordinary shot and doesn't get harm from an upgraded shot.
You need to pass the prison delightfully, I. e., kill every one of the beasts with a similar improved shot (I. e. after some upgraded shot, the wellbeing points of every one of the beasts should become equivalent to 0 interestingly). Each shot should hit a beast, I. e. each shot arrangements harm to something like one beast.
Input
The primary line contains a solitary integer t (1≤t≤104) — the number of experiments.
Each experiment comprises of a solitary line that contains three integers a, b and c (1≤a,b,c≤108) — the number of wellbeing focuses every beast has.
Output
For each experiment, print YES in the event that you can kill every one of the beasts with a similar improved shot. In any case, print NO. You might print each letter regardless (for instance, YES, Yes, indeed, yEs will be in every way perceived as sure reply).
Step by step
Solved in 4 steps with 1 images