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

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter4: Selection Structures
Section: Chapter Questions
Problem 14PP
icon
Related questions
icon
Concept explainers
Question

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).

 

 

Expert Solution
steps

Step by step

Solved in 4 steps with 1 images

Blurred answer
Knowledge Booster
Control Structure
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT