# coding: utf-8

N = int(raw_input())

dataList = []
for i in range(N):
    list = map(int, raw_input().split())
    dataList.append(list)

# find max number
for i in range(len(dataList)):
    idx = dataList[i].index(max(dataList[i]))
    lar = dataList[i][idx]
    del dataList[i][idx]
    if lar**2 == dataList[i][0] ** 2 + dataList[i][1]**2:
        print "YES"
    else:
        print "NO" N = int(raw_input()) N int(raw_input()) int raw_input() raw_input dataList = [] dataList [] for i in range(N):
    list = map(int, raw_input().split())
    dataList.append(list)

# find max number i range(N) range N list = map(int, raw_input().split()) list map(int, raw_input().split()) map int raw_input().split() ().split () raw_input split dataList.append(list) dataList.append dataList append list for i in range(len(dataList)):
    idx = dataList[i].index(max(dataList[i]))
    lar = dataList[i][idx]
    del dataList[i][idx]
    if lar**2 == dataList[i][0] ** 2 + dataList[i][1]**2:
        print "YES"
    else:
        print "NO" i range(len(dataList)) range len(dataList) len dataList idx = dataList[i].index(max(dataList[i])) idx dataList[i].index(max(dataList[i])) [i].index [i] dataList i index max(dataList[i]) max dataList[i] dataList i lar = dataList[i][idx] lar dataList[i][idx] [i] dataList i idx del dataList[i][idx] dataList[i][idx] [i] dataList i idx if lar**2 == dataList[i][0] ** 2 + dataList[i][1]**2:
        print "YES"
    else:
        print "NO" lar**2 == dataList[i][0] ** 2 + dataList[i][1]**2 lar**2 lar 2 dataList[i][0] ** 2 + dataList[i][1]**2 dataList[i][0] ** 2 dataList[i][0] [i] dataList i 0 2 dataList[i][1]**2 dataList[i][1] [i] dataList i 1 2 print print idx = dataList[i].index(max(dataList[i])) dataList[i].index(max(dataList[i])) idx lar = dataList[i][idx] dataList[i][idx] lar list = map(int, raw_input().split()) map(int, raw_input().split()) list N = int(raw_input()) int(raw_input()) N dataList = [] [] dataList
# coding: utf-8

N = int(raw_input())

dataList = []
for i in range(N):
    list = map(int, raw_input().split())
    dataList.append(list)

# find max number
for i in range(len(dataList)):
    idx = dataList[i].index(max(dataList[i]))
    lar = dataList[i][idx]
    del dataList[i][idx]
    if lar**2 == dataList[i][0] ** 2 + dataList[i][1]**2:
        print "YES"
    else:
        print "NO"