시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 256 MB46140236587.112%

문제

ICPC donation center is preparing donation packages for people who faced disaster in every area in Thailand. The center gets several kinds of donation. In this year, the center gets a request to pack the basic items in one package which consists of three sets. The first set, called SetA, is water and beverage. The second one, SetB, consists of instant noodle, canned food and rice. And the last set, SetC, is first aid kits and tissue paper. In every day, we try to pack and distribute donation packages as many as possible. We have constrains for packaging which are: one package has to comprise of SetA , SetB and SetC equally and one distribution contains the minimum of 30 packages. However, the center receives these 3 sets in different amount each day. Therefore, the center must wait until the accumulated amount of each and every set over 30 in order to pack a distribution.

입력

The input will start with an integer T (1<= T <= 365), the number of consecutive donation days. The next T lines show donation in each day, consisting of three integers: the number of setA, SetB and setC, respectively.

출력

For each day, print out the maximum number of packages to be distributed on that day. If the packages cannot be distributed on that day (number of packages is less than 30), print NO. 

예제 입력 1

5
20 30 60
20 30 60
50 40 60
50 10 10
0 50 50

예제 출력 1

NO
40
50
NO
50