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