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
for _ in[0]*int(input()):a,b,c=sorted(map(int,input().split()));print(['NO','YES'][a*a+b*b==c*c])