n=int(input())
for i in range(n):
    c,d,b=map(int,input().split())

    if c*c+d*d==b*b or c*c+b*b==d*d or b*b+d*d==c*c:
        print("YES")
    else:
        print("NO") n=int(input()) n int(input()) int input() input for i in range(n):
    c,d,b=map(int,input().split())

    if c*c+d*d==b*b or c*c+b*b==d*d or b*b+d*d==c*c:
        print("YES")
    else:
        print("NO") i range(n) range n c,d,b=map(int,input().split()) c map(int,input().split()) map int input().split() ().split () input split d b if c*c+d*d==b*b or c*c+b*b==d*d or b*b+d*d==c*c:
        print("YES")
    else:
        print("NO") c*c+d*d==b*b or c*c+b*b==d*d or b*b+d*d==c*c c*c+d*d==b*b or c*c+b*b==d*d c*c+d*d==b*b c*c+d*d c*c c c d*d d d b*b b b c*c+b*b==d*d c*c+b*b c*c c c b*b b b d*d d d b*b+d*d==c*c b*b+d*d b*b b b d*d d d c*c c c print("YES") print "YES" print("NO") print "NO" b=map(int,input().split()) map(int,input().split()) b c,d,b=map(int,input().split()) map(int,input().split()) c d,b=map(int,input().split()) map(int,input().split()) d n=int(input()) int(input()) n
n=int(input())
for i in range(n):
    c,d,b=map(int,input().split())

    if c*c+d*d==b*b or c*c+b*b==d*d or b*b+d*d==c*c:
        print("YES")
    else:
        print("NO")
