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

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education