n = input()
for x in xrange(n):
    sides = map(int,raw_input().split())
    sides = sorted(sides)
    if sides[0]**2+sides[1]**2==sides[2]**2:
        print "YES"
    else:
        print "NO" n = input() n input() input for x in xrange(n):
    sides = map(int,raw_input().split())
    sides = sorted(sides)
    if sides[0]**2+sides[1]**2==sides[2]**2:
        print "YES"
    else:
        print "NO" x xrange(n) xrange n sides = map(int,raw_input().split()) sides map(int,raw_input().split()) map int raw_input().split() ().split () raw_input split sides = sorted(sides) sides sorted(sides) sorted sides if sides[0]**2+sides[1]**2==sides[2]**2:
        print "YES"
    else:
        print "NO" sides[0]**2+sides[1]**2==sides[2]**2 sides[0]**2+sides[1]**2 sides[0]**2 sides[0] sides 0 2 sides[1]**2 sides[1] sides 1 2 sides[2]**2 sides[2] sides 2 2 print print sides = map(int,raw_input().split()) map(int,raw_input().split()) sides sides = sorted(sides) sorted(sides) sides n = input() input() n
n = input()
for x in xrange(n):
    sides = map(int,raw_input().split())
    sides = sorted(sides)
    if sides[0]**2+sides[1]**2==sides[2]**2:
        print "YES"
    else:
        print "NO"