Write a program to check whether a triangle is valid or not, when the three angles of the triangle are the inputs. A triangle is valid if the sum of all the three angles is equal to 180 degrees.

-----Input-----

The first line contains an integer T, the total number of testcases. Then T lines follow, each line contains three angles  A, B and C, of the triangle separated by space. 

-----Output-----
For each test case, display 'YES' if the triangle is valid, and 'NO', if it is not, in a new line.

-----Constraints-----
- 1 ≤ T ≤ 1000
- 1 ≤ A,B,C ≤ 180

-----Example-----
Input

3 
40 40 100
45 45 90
180 1 1
Output

YES
YES
NO

Starter code:

Solutions:
n=int(input())
for i in range(n):
    a,b,c=map(int,input().split())
    if a>0 and b>0 and c>0 and a+b+c==180:
        print("YES")
    else:
        print("NO")

for _ in range (int(input())):
    a,b,c = map(int,input().split())
    if a+b+c==180:
        print("YES")
    else:
        print("NO")

# cook your dish here
t= int(input())
for i in range(t):
    a,b,c = map(int,input().split())
    if(a+b+c==180):
        print("YES")
    else:
        print("NO")

# cook your dish here
n  = int(input())
while n>0:
    a = list(map(int,input().strip().split()))
    if sum(a)==180:
        print("YES")
    else:
        print("NO")
    n = n-1

t=int(input())
for x in range(t):
    a,b,c=map(int, input().split())
    if a+b+c==180:
        print("YES")
    else:
        print("NO")

# cook your dish here
n  = int(input())
while n>0:
    a = list(map(int,input().strip().split()))
    if sum(a)==180:
        print("YES")
    else:
        print("NO")
    n = n-1

for _ in range (int(input())):
    a,b,c = map(int,input().split())
    if a+b+c==180:
        print("YES")
    else:
        print("NO")

# cook your dish here
t=int(input())
for i in range(0,t):
    a,b,c=map(int,input().split())
    if (a+b+c)==180:
        print("YES")
    else:
        print("NO")

for _ in range(int(input())):
    (a,b,c)=map(int,input().split())
    if (a+b+c)==180:
        print("YES")
    else:
        print("NO")

# cook your dish here
try:
    t=int(input())
    for i in range(0,t):
        a,b,c=map(int,input().split())
        if(a+b+c==180):
            print("YES")
        else:
            print("NO")
except:
    pass

for _ in range(int(input())):

    x,y,z=list(map(int,input().split()))
    sum=x+y+z
    if sum==180:
        print('YES')
    else:
        print('NO')


# cook your dish here
for _ in range(int(input())):
    l=list(map(int,input().split(' ')))
    if(sum(l)==180):
        print('YES')
    else:
        print('NO')

N=int(input())
for i in range(N):
    a,b,c=list(map(int,input().split()))
    if(a+b+c==180):
        print('YES')
    else:
        print('NO')


# cook your dish here
x=int(input())
for i in range(x):
    (a,b,c) = list(map(int, input().split(' ')))
    if((a+b+c)==180):
        print("YES")
    else:
        print("NO")


def valid(a,b,c):
    if (a+b+c) == 180:
        print("YES")
    else:
        print("NO")

t=int(input())
while t:
    t = t - 1
    a,b,c = list(map(int, input().split()))
    valid(a,b,c)


# cook your dish here
T=int(input())
for i in range(T):
    a,b,c=list(map(int,input().split()))
    #p=int(input())
    if a+b+c==180:
        print("YES")
    else:
        print("NO")


# cook your dish here
for _ in range(int(input())):
    z = list(map(int, input().split()))
    if sum(z) == 180:
        print("YES")
    else:
        print("NO")

# cook your dish here
t=int(input())
while t!=0:
    x,y,z=[int(k) for k in input().split()]
    if x+y+z==180:
        print("YES")
    else:
        print("NO")
    t-=1

for t in range(int(input())):
    l=[int(i) for i in input().split()]
    if sum(l)==180:print("YES")
    else:print("NO")

# cook your dish here
n=int(input())
for i in range(n):
    l=[int(i) for i in input().split()]
    if sum(l)==180:print("YES")
    else:print("NO")

# cook your dish here
for i in range(int(input())):
    b, t, s = map(int, input().split())
    if b+t+s == 180:
        print("YES")
    else:
        print("NO")

# cook your dish here
for i in range(int(input())):
    a, b, c = map(int, input().split())
    if a+b+c == 180:
        print("YES")
    else:
        print("NO")

# cook your dish here
test_case = int(input())

while test_case > 0:
    angle = [int(x) for x in input().split(' ')]
    if sum(angle) == 180:
        print("YES")
    else:
        print("NO")
    test_case -= 1

# cook your dish here
T = int(input())

for i in range(T):
    A,B,C = map(int, input().split())
    if A+B+C == 180:
        print("YES")
    else:
        print("NO")

t=int(input())
i=0
while i<t:
	a,b,c=input().split()
	a=int(a)
	b=int(b)
	c=int(c)
	if a+b+c==180:
		print("YES")
	else:
		print("NO")
	i+=1