def main():
    n = int(input())
    for i in range(n):
        a=[int(x) for x in input().split()]
        a.sort()
        if a[0] ** 2 + a[1] ** 2 != a[2] ** 2:
            print("NO")
        else:
            print("YES")

main() def main():
    n = int(input())
    for i in range(n):
        a=[int(x) for x in input().split()]
        a.sort()
        if a[0] ** 2 + a[1] ** 2 != a[2] ** 2:
            print("NO")
        else:
            print("YES") main n = int(input()) n int(input()) int input() input for i in range(n):
        a=[int(x) for x in input().split()]
        a.sort()
        if a[0] ** 2 + a[1] ** 2 != a[2] ** 2:
            print("NO")
        else:
            print("YES") i range(n) range n int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x a=[int(x) for x in input().split()] a [int(x) for x in input().split()] a.sort() a.sort a sort if a[0] ** 2 + a[1] ** 2 != a[2] ** 2:
            print("NO")
        else:
            print("YES") a[0] ** 2 + a[1] ** 2 != a[2] ** 2 a[0] ** 2 + a[1] ** 2 a[0] ** 2 a[0] a 0 2 a[1] ** 2 a[1] a 1 2 a[2] ** 2 a[2] a 2 2 print("NO") print "NO" print("YES") print "YES" main() main def main():
    n = int(input())
    for i in range(n):
        a=[int(x) for x in input().split()]
        a.sort()
        if a[0] ** 2 + a[1] ** 2 != a[2] ** 2:
            print("NO")
        else:
            print("YES") def main():
    n = int(input())
    for i in range(n):
        a=[int(x) for x in input().split()]
        a.sort()
        if a[0] ** 2 + a[1] ** 2 != a[2] ** 2:
            print("NO")
        else:
            print("YES") main
def main():
    n = int(input())
    for i in range(n):
        a=[int(x) for x in input().split()]
        a.sort()
        if a[0] ** 2 + a[1] ** 2 != a[2] ** 2:
            print("NO")
        else:
            print("YES")

main()
