import sys

n = input()
for a,b,c in map(lambda x: sorted(map(int,x.split())),sys.stdin.readlines()):
    print("YES" if a*a+b*b==c*c else "NO") import sys sys n = input() n input() input for a,b,c in map(lambda x: sorted(map(int,x.split())),sys.stdin.readlines()):
    print("YES" if a*a+b*b==c*c else "NO") a b c map(lambda x: sorted(map(int,x.split())),sys.stdin.readlines()) map lambda x: sorted(map(int,x.split())) sorted(map(int,x.split())) sorted map(int,x.split()) map int x.split() x.split x split x sys.stdin.readlines() sys.stdin.readlines sys.stdin sys stdin readlines print("YES" if a*a+b*b==c*c else "NO") print "YES" if a*a+b*b==c*c else "NO" a*a+b*b==c*c a*a+b*b a*a a a b*b b b c*c c c "YES" "NO" n = input() input() n
import sys

n = input()
for a,b,c in map(lambda x: sorted(map(int,x.split())),sys.stdin.readlines()):
    print("YES" if a*a+b*b==c*c else "NO")