# -*- coding: utf-8 -*-

import sys
import os

N = int(input())
for i in range(N):
    lst = list(map(int, input().split()))
    mx = max(lst)
    lst.remove(mx)

    if mx * mx == lst[0] * lst[0] + lst[1] * lst[1]:
        print('YES')
    else:
        print('NO') import sys sys import os os N = int(input()) N int(input()) int input() input for i in range(N):
    lst = list(map(int, input().split()))
    mx = max(lst)
    lst.remove(mx)

    if mx * mx == lst[0] * lst[0] + lst[1] * lst[1]:
        print('YES')
    else:
        print('NO') i range(N) range N lst = list(map(int, input().split())) lst list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split mx = max(lst) mx max(lst) max lst lst.remove(mx) lst.remove lst remove mx if mx * mx == lst[0] * lst[0] + lst[1] * lst[1]:
        print('YES')
    else:
        print('NO') mx * mx == lst[0] * lst[0] + lst[1] * lst[1] mx * mx mx mx lst[0] * lst[0] + lst[1] * lst[1] lst[0] * lst[0] lst[0] lst 0 lst[0] lst 0 lst[1] * lst[1] lst[1] lst 1 lst[1] lst 1 print('YES') print 'YES' print('NO') print 'NO' N = int(input()) int(input()) N lst = list(map(int, input().split())) list(map(int, input().split())) lst mx = max(lst) max(lst) mx
# -*- coding: utf-8 -*-

import sys
import os

N = int(input())
for i in range(N):
    lst = list(map(int, input().split()))
    mx = max(lst)
    lst.remove(mx)

    if mx * mx == lst[0] * lst[0] + lst[1] * lst[1]:
        print('YES')
    else:
        print('NO')