import sys

raw_input()

for line in sys.stdin.readlines():
    a, b, c = map(int, line.strip().split())
    input_list = [a, b, c]
    input_list.sort()
    if input_list[2] ** 2 ==  input_list[0] ** 2 + input_list[1] ** 2:
    	print 'YES'
    else:
    	print 'NO' import sys sys raw_input() raw_input for line in sys.stdin.readlines():
    a, b, c = map(int, line.strip().split())
    input_list = [a, b, c]
    input_list.sort()
    if input_list[2] ** 2 ==  input_list[0] ** 2 + input_list[1] ** 2:
    	print 'YES'
    else:
    	print 'NO' line sys.stdin.readlines() sys.stdin.readlines sys.stdin sys stdin readlines a, b, c = map(int, line.strip().split()) a map(int, line.strip().split()) map int line.strip().split() line.strip().split line.strip() line.strip line strip split b c input_list = [a, b, c] input_list [a, b, c] a b c input_list.sort() input_list.sort input_list sort if input_list[2] ** 2 ==  input_list[0] ** 2 + input_list[1] ** 2:
    	print 'YES'
    else:
    	print 'NO' input_list[2] ** 2 ==  input_list[0] ** 2 + input_list[1] ** 2 input_list[2] ** 2 input_list[2] input_list 2 2 input_list[0] ** 2 + input_list[1] ** 2 input_list[0] ** 2 input_list[0] input_list 0 2 input_list[1] ** 2 input_list[1] input_list 1 2 print print a, b, c = map(int, line.strip().split()) map(int, line.strip().split()) a b, c = map(int, line.strip().split()) map(int, line.strip().split()) b c = map(int, line.strip().split()) map(int, line.strip().split()) c input_list = [a, b, c] [a, b, c] input_list
import sys

raw_input()

for line in sys.stdin.readlines():
    a, b, c = map(int, line.strip().split())
    input_list = [a, b, c]
    input_list.sort()
    if input_list[2] ** 2 ==  input_list[0] ** 2 + input_list[1] ** 2:
    	print 'YES'
    else:
    	print 'NO'