import sys

N = int(raw_input())
for line in sys.stdin:
    a, b, c = sorted(map(int, line.split()))
    if a ** 2 + b ** 2 == c ** 2:
        print 'YES'
    else:
        print 'NO' import sys sys N = int(raw_input()) N int(raw_input()) int raw_input() raw_input for line in sys.stdin:
    a, b, c = sorted(map(int, line.split()))
    if a ** 2 + b ** 2 == c ** 2:
        print 'YES'
    else:
        print 'NO' line sys.stdin sys stdin a, b, c = sorted(map(int, line.split())) a sorted(map(int, line.split())) sorted map(int, line.split()) map int line.split() line.split line split b c if a ** 2 + b ** 2 == c ** 2:
        print 'YES'
    else:
        print 'NO' a ** 2 + b ** 2 == c ** 2 a ** 2 + b ** 2 a ** 2 a 2 b ** 2 b 2 c ** 2 c 2 print print b, c = sorted(map(int, line.split())) sorted(map(int, line.split())) b c = sorted(map(int, line.split())) sorted(map(int, line.split())) c N = int(raw_input()) int(raw_input()) N a, b, c = sorted(map(int, line.split())) sorted(map(int, line.split())) a
import sys

N = int(raw_input())
for line in sys.stdin:
    a, b, c = sorted(map(int, line.split()))
    if a ** 2 + b ** 2 == c ** 2:
        print 'YES'
    else:
        print 'NO'