# coding: utf-8
#Problem Name: Is it a Right Triangle?
#ID: tabris
#Mail: t123037@kaiyodai.ac.jp

n = int(raw_input())
for i in range(n):
    side = sorted(map(int,raw_input().split(' ')))
    if side[0]**2 + side[1]**2 - side[2]**2:
        print 'NO'
    else:
        print 'YES'

'''
Sample Input
3
4 3 5
4 3 6
8 8 8
''' n = int(raw_input()) n int(raw_input()) int raw_input() raw_input for i in range(n):
    side = sorted(map(int,raw_input().split(' ')))
    if side[0]**2 + side[1]**2 - side[2]**2:
        print 'NO'
    else:
        print 'YES' i range(n) range n side = sorted(map(int,raw_input().split(' '))) side sorted(map(int,raw_input().split(' '))) sorted map(int,raw_input().split(' ')) map int raw_input().split(' ') ().split () raw_input split ' ' if side[0]**2 + side[1]**2 - side[2]**2:
        print 'NO'
    else:
        print 'YES' side[0]**2 + side[1]**2 - side[2]**2 side[0]**2 + side[1]**2 side[0]**2 side[0] side 0 2 side[1]**2 side[1] side 1 2 side[2]**2 side[2] side 2 2 print print '''
Sample Input
3
4 3 5
4 3 6
8 8 8
''' side = sorted(map(int,raw_input().split(' '))) sorted(map(int,raw_input().split(' '))) side n = int(raw_input()) int(raw_input()) n
# coding: utf-8
#Problem Name: Is it a Right Triangle?
#ID: tabris
#Mail: t123037@kaiyodai.ac.jp

n = int(raw_input())
for i in range(n):
    side = sorted(map(int,raw_input().split(' ')))
    if side[0]**2 + side[1]**2 - side[2]**2:
        print 'NO'
    else:
        print 'YES'

'''
Sample Input
3
4 3 5
4 3 6
8 8 8
'''