Write a program which judges wheather given length of three side form a right triangle. Print "YES" if the given sides (integers) form a right triangle, "NO" if not so.
n = int(input())
for i in range(n):
    li = sorted([int(j) for j in input().split()])
    print("Yes" if li[0] ** 2 + li[1] ** 2 == li[2] ** 2 else "No")
for i in range(int(input())):
    li = sorted([int(j) for j in input().split()])
    print("YES" if li[0] ** 2 + li[1] ** 2 == li[2] ** 2 else "NO")