while True:
    n = int(input())
    if n <= 1000:
        break

for i in range(1, n+1):
    l = list(map(int, input().split()))
    l.sort()
    if l[0]*l[0]+l[1]*l[1] == l[2]*l[2]:     
        print('YES')
    else :
        print('NO') while True:
    n = int(input())
    if n <= 1000:
        break True n = int(input()) n int(input()) int input() input if n <= 1000:
        break n <= 1000 n 1000 break for i in range(1, n+1):
    l = list(map(int, input().split()))
    l.sort()
    if l[0]*l[0]+l[1]*l[1] == l[2]*l[2]:     
        print('YES')
    else :
        print('NO') i range(1, n+1) range 1 n+1 n 1 l = list(map(int, input().split())) l list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split l.sort() l.sort l sort if l[0]*l[0]+l[1]*l[1] == l[2]*l[2]:     
        print('YES')
    else :
        print('NO') l[0]*l[0]+l[1]*l[1] == l[2]*l[2] l[0]*l[0]+l[1]*l[1] l[0]*l[0] l[0] l 0 l[0] l 0 l[1]*l[1] l[1] l 1 l[1] l 1 l[2]*l[2] l[2] l 2 l[2] l 2 print('YES') print 'YES' print('NO') print 'NO' l = list(map(int, input().split())) list(map(int, input().split())) l n = int(input()) int(input()) n
while True:
    n = int(input())
    if n <= 1000:
        break

for i in range(1, n+1):
    l = list(map(int, input().split()))
    l.sort()
    if l[0]*l[0]+l[1]*l[1] == l[2]*l[2]:     
        print('YES')
    else :
        print('NO')
