def main():

    data_count = int(input())
    data = [list(map(int, input().split())) for i in range(data_count)]

    for item in data:
        item.sort()
        print('YES') if item[0]**2 + item[1]**2 == item[2]**2 else print('NO')


main() def main():

    data_count = int(input())
    data = [list(map(int, input().split())) for i in range(data_count)]

    for item in data:
        item.sort()
        print('YES') if item[0]**2 + item[1]**2 == item[2]**2 else print('NO') main data_count = int(input()) data_count int(input()) int input() input list(map(int, input().split())) for i in range(data_count) for i in range(data_count) i range(data_count) range data_count for i in range(data_count) list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split data = [list(map(int, input().split())) for i in range(data_count)] data [list(map(int, input().split())) for i in range(data_count)] for item in data:
        item.sort()
        print('YES') if item[0]**2 + item[1]**2 == item[2]**2 else print('NO') item data item.sort() item.sort item sort print('YES') if item[0]**2 + item[1]**2 == item[2]**2 else print('NO') item[0]**2 + item[1]**2 == item[2]**2 item[0]**2 + item[1]**2 item[0]**2 item[0] item 0 2 item[1]**2 item[1] item 1 2 item[2]**2 item[2] item 2 2 print('YES') print 'YES' print('NO') print 'NO' main() main def main():

    data_count = int(input())
    data = [list(map(int, input().split())) for i in range(data_count)]

    for item in data:
        item.sort()
        print('YES') if item[0]**2 + item[1]**2 == item[2]**2 else print('NO') def main():

    data_count = int(input())
    data = [list(map(int, input().split())) for i in range(data_count)]

    for item in data:
        item.sort()
        print('YES') if item[0]**2 + item[1]**2 == item[2]**2 else print('NO') main
def main():

    data_count = int(input())
    data = [list(map(int, input().split())) for i in range(data_count)]

    for item in data:
        item.sort()
        print('YES') if item[0]**2 + item[1]**2 == item[2]**2 else print('NO')


main()