N=int(input())
for line in range(N):
    a,b,c = (int(i) for i in input().split())
    if (a**2+b**2==c**2) or (b**2+c**2==a**2) or (c**2+a**2==b**2):
        print('YES')
    else:
        print('NO') N=int(input()) N int(input()) int input() input for line in range(N):
    a,b,c = (int(i) for i in input().split())
    if (a**2+b**2==c**2) or (b**2+c**2==a**2) or (c**2+a**2==b**2):
        print('YES')
    else:
        print('NO') line range(N) range N int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i a,b,c = (int(i) for i in input().split()) a (int(i) for i in input().split()) b c if (a**2+b**2==c**2) or (b**2+c**2==a**2) or (c**2+a**2==b**2):
        print('YES')
    else:
        print('NO') (a**2+b**2==c**2) or (b**2+c**2==a**2) or (c**2+a**2==b**2) (a**2+b**2==c**2) or (b**2+c**2==a**2) a**2+b**2==c**2 a**2+b**2 a**2 a 2 b**2 b 2 c**2 c 2 b**2+c**2==a**2 b**2+c**2 b**2 b 2 c**2 c 2 a**2 a 2 c**2+a**2==b**2 c**2+a**2 c**2 c 2 a**2 a 2 b**2 b 2 print('YES') print 'YES' print('NO') print 'NO' c = (int(i) for i in input().split()) (int(i) for i in input().split()) c N=int(input()) int(input()) N a,b,c = (int(i) for i in input().split()) (int(i) for i in input().split()) a b,c = (int(i) for i in input().split()) (int(i) for i in input().split()) b
N=int(input())
for line in range(N):
    a,b,c = (int(i) for i in input().split())
    if (a**2+b**2==c**2) or (b**2+c**2==a**2) or (c**2+a**2==b**2):
        print('YES')
    else:
        print('NO')