n = int(input())
for _ in range(n):
    l = list(map(int,input().split()))
    idx = l.index(max(l))
    c = l[idx]
    a, b  = [x for i,x in enumerate(l) if i != idx] 
    if a**2 + b**2 == c**2:
        print("YES")
    else:
        print("NO") n = int(input()) n int(input()) int input() input for _ in range(n):
    l = list(map(int,input().split()))
    idx = l.index(max(l))
    c = l[idx]
    a, b  = [x for i,x in enumerate(l) if i != idx] 
    if a**2 + b**2 == c**2:
        print("YES")
    else:
        print("NO") _ range(n) range n l = list(map(int,input().split())) l list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split idx = l.index(max(l)) idx l.index(max(l)) l.index l index max(l) max l c = l[idx] c l[idx] l idx x for i,x in enumerate(l) if i != idx for i,x in enumerate(l) if i != idx i x enumerate(l) enumerate l i != idx i idx if i != idx x a, b  = [x for i,x in enumerate(l) if i != idx] a [x for i,x in enumerate(l) if i != idx] b if a**2 + b**2 == c**2:
        print("YES")
    else:
        print("NO") a**2 + b**2 == c**2 a**2 + b**2 a**2 a 2 b**2 b 2 c**2 c 2 print("YES") print "YES" print("NO") print "NO" a, b  = [x for i,x in enumerate(l) if i != idx] [x for i,x in enumerate(l) if i != idx] a n = int(input()) int(input()) n l = list(map(int,input().split())) list(map(int,input().split())) l b  = [x for i,x in enumerate(l) if i != idx] [x for i,x in enumerate(l) if i != idx] b idx = l.index(max(l)) l.index(max(l)) idx c = l[idx] l[idx] c
n = int(input())
for _ in range(n):
    l = list(map(int,input().split()))
    idx = l.index(max(l))
    c = l[idx]
    a, b  = [x for i,x in enumerate(l) if i != idx] 
    if a**2 + b**2 == c**2:
        print("YES")
    else:
        print("NO")