#!/usr/bin/env python3
# -*- coding: utf-8 -*-

def is_right(a, b, c):
    a2 = a*a
    b2 = b*b
    c2 = c*c

    return a2==b2+c2 or b2==c2+a2 or c2==a2+b2

def main():
    N = int(input())

    for _ in range(N):
        a, b, c = map(int, input().split())

        result = is_right(a, b, c)
        print("YES" if result else "NO")

if __name__ == "__main__": main() def is_right(a, b, c):
    a2 = a*a
    b2 = b*b
    c2 = c*c

    return a2==b2+c2 or b2==c2+a2 or c2==a2+b2 is_right a2 = a*a a2 a*a a a b2 = b*b b2 b*b b b c2 = c*c c2 c*c c c return a2==b2+c2 or b2==c2+a2 or c2==a2+b2 a2==b2+c2 or b2==c2+a2 or c2==a2+b2 a2==b2+c2 or b2==c2+a2 a2==b2+c2 a2 b2+c2 b2 c2 b2==c2+a2 b2 c2+a2 c2 a2 c2==a2+b2 c2 a2+b2 a2 b2 a a b b c c def main():
    N = int(input())

    for _ in range(N):
        a, b, c = map(int, input().split())

        result = is_right(a, b, c)
        print("YES" if result else "NO") main N = int(input()) N int(input()) int input() input for _ in range(N):
        a, b, c = map(int, input().split())

        result = is_right(a, b, c)
        print("YES" if result else "NO") _ range(N) range N a, b, c = map(int, input().split()) a map(int, input().split()) map int input().split() ().split () input split b c result = is_right(a, b, c) result is_right(a, b, c) is_right a b c print("YES" if result else "NO") print "YES" if result else "NO" result "YES" "NO" if __name__ == "__main__": main() __name__ == "__main__" __name__ "__main__" def is_right(a, b, c):
    a2 = a*a
    b2 = b*b
    c2 = c*c

    return a2==b2+c2 or b2==c2+a2 or c2==a2+b2 def is_right(a, b, c):
    a2 = a*a
    b2 = b*b
    c2 = c*c

    return a2==b2+c2 or b2==c2+a2 or c2==a2+b2 is_right def main():
    N = int(input())

    for _ in range(N):
        a, b, c = map(int, input().split())

        result = is_right(a, b, c)
        print("YES" if result else "NO") def main():
    N = int(input())

    for _ in range(N):
        a, b, c = map(int, input().split())

        result = is_right(a, b, c)
        print("YES" if result else "NO") main
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

def is_right(a, b, c):
    a2 = a*a
    b2 = b*b
    c2 = c*c

    return a2==b2+c2 or b2==c2+a2 or c2==a2+b2

def main():
    N = int(input())

    for _ in range(N):
        a, b, c = map(int, input().split())

        result = is_right(a, b, c)
        print("YES" if result else "NO")

if __name__ == "__main__": main()