for _ in[0]*int(input()):
 a,b,c=sorted(map(int,input().split()))
 print(['NO','YES'][a*a+b*b==c*c]) for _ in[0]*int(input()):
 a,b,c=sorted(map(int,input().split()))
 print(['NO','YES'][a*a+b*b==c*c]) _ [0]*int(input()) [0] 0 int(input()) int input() input a,b,c=sorted(map(int,input().split())) a sorted(map(int,input().split())) sorted map(int,input().split()) map int input().split() ().split () input split b c print(['NO','YES'][a*a+b*b==c*c]) print ['NO','YES'][a*a+b*b==c*c] ['NO','YES'] 'NO' 'YES' a*a+b*b==c*c a*a+b*b a*a a a b*b b b c*c c c b,c=sorted(map(int,input().split())) sorted(map(int,input().split())) b a,b,c=sorted(map(int,input().split())) sorted(map(int,input().split())) a c=sorted(map(int,input().split())) sorted(map(int,input().split())) c
for _ in[0]*int(input()):
 a,b,c=sorted(map(int,input().split()))
 print(['NO','YES'][a*a+b*b==c*c])
