baahubali-and-mathematics-ii
Source: hackerearth
Difficulty: UNKNOWN_DIFFICULTY

It's been a hard time for Baahubali in mathematics. Yet another challenge from Kattappa. 
Baahubali is given 5 integers in the range 0-50, he needs to figure out if there is a way to obtain a result 23 from those numbers if only operations allowed between any two integers are +, -, *

Final operated result should be of the form
((((num1 op1 num2) op2 num3) op3 num4) op4 num5)

Input

First Line, number of test cases 1 ≤ t ≤ 100

Each test case has 5 integers in the range  0 to 50 (inclusive)

Output

For each test case, print "YES" (without quotes) if 23 is obtainable else "NO" (without quotes) 

SAMPLE INPUT
2
1 1 1 1 1
1 2 3 4 5

SAMPLE OUTPUT
NO
YES

Explanation

Case 1 : There is no way to get 23. Hence NO

case 2 :  1 + 2 * 5 + 3 * 4 = 23. Hence YES