#!/usr/bin/env python
# coding: utf-8


def is_right_triangle(a, b, c):
    return a ** 2 + b ** 2 == c ** 2


def main():
    input_count = int(raw_input())
    for i in xrange(input_count):
        L = raw_input().split(" ")
        L = map(long, L)
        L.sort()
        print ("NO", "YES")[is_right_triangle(*L)]

if __name__ == '__main__':
    main() def is_right_triangle(a, b, c):
    return a ** 2 + b ** 2 == c ** 2 is_right_triangle return a ** 2 + b ** 2 == c ** 2 a ** 2 + b ** 2 == c ** 2 a ** 2 + b ** 2 a ** 2 a 2 b ** 2 b 2 c ** 2 c 2 a a b b c c def main():
    input_count = int(raw_input())
    for i in xrange(input_count):
        L = raw_input().split(" ")
        L = map(long, L)
        L.sort()
        print ("NO", "YES")[is_right_triangle(*L)] main input_count = int(raw_input()) input_count int(raw_input()) int raw_input() raw_input for i in xrange(input_count):
        L = raw_input().split(" ")
        L = map(long, L)
        L.sort()
        print ("NO", "YES")[is_right_triangle(*L)] i xrange(input_count) xrange input_count L = raw_input().split(" ") L raw_input().split(" ") ().split () raw_input split " " L = map(long, L) L map(long, L) map long L L.sort() L.sort L sort print ("NO", "YES")[is_right_triangle(*L)] ("NO", "YES") print "NO" "YES" is_right_triangle(*L) is_right_triangle *L L if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def is_right_triangle(a, b, c):
    return a ** 2 + b ** 2 == c ** 2 def is_right_triangle(a, b, c):
    return a ** 2 + b ** 2 == c ** 2 is_right_triangle def main():
    input_count = int(raw_input())
    for i in xrange(input_count):
        L = raw_input().split(" ")
        L = map(long, L)
        L.sort()
        print ("NO", "YES")[is_right_triangle(*L)] def main():
    input_count = int(raw_input())
    for i in xrange(input_count):
        L = raw_input().split(" ")
        L = map(long, L)
        L.sort()
        print ("NO", "YES")[is_right_triangle(*L)] main
#!/usr/bin/env python
# coding: utf-8


def is_right_triangle(a, b, c):
    return a ** 2 + b ** 2 == c ** 2


def main():
    input_count = int(raw_input())
    for i in xrange(input_count):
        L = raw_input().split(" ")
        L = map(long, L)
        L.sort()
        print ("NO", "YES")[is_right_triangle(*L)]

if __name__ == '__main__':
    main()