import collections
import sys

def read_prob():
    inputs = []
    try:
        counter = 0
        while True:
            if counter == 0:
                line = input().strip()
                size = int(line)
            else:
                line = input().strip().split()
                a, b, c = line[0], line[1], line[2]
                inputs.append([int(a),  int(b), int(c)])
            counter += 1
    except EOFError:
        pass
    return inputs

def triangle(inputs):
    f = lambda x: x * x
    inputs = list(map(f, inputs))
    # print(inputs)
    a, b, c = inputs[0], inputs[1], inputs[2]
    if a + b == c:
        return True
    elif a + c == b:
        return True
    elif b + c == a:
        return True
    else:
        return False

if __name__ == '__main__':
    inputs = read_prob()
    for inp in inputs:
        if triangle(inp):
            print("YES")
        else:
            print("NO")
 import collections collections import sys sys def read_prob():
    inputs = []
    try:
        counter = 0
        while True:
            if counter == 0:
                line = input().strip()
                size = int(line)
            else:
                line = input().strip().split()
                a, b, c = line[0], line[1], line[2]
                inputs.append([int(a),  int(b), int(c)])
            counter += 1
    except EOFError:
        pass
    return inputs read_prob inputs = [] inputs [] try:
        counter = 0
        while True:
            if counter == 0:
                line = input().strip()
                size = int(line)
            else:
                line = input().strip().split()
                a, b, c = line[0], line[1], line[2]
                inputs.append([int(a),  int(b), int(c)])
            counter += 1
    except EOFError:
        pass
     except EOFError:
        pass
     counter = 0 counter 0 while True:
            if counter == 0:
                line = input().strip()
                size = int(line)
            else:
                line = input().strip().split()
                a, b, c = line[0], line[1], line[2]
                inputs.append([int(a),  int(b), int(c)])
            counter += 1
     True if counter == 0:
                line = input().strip()
                size = int(line)
            else:
                line = input().strip().split()
                a, b, c = line[0], line[1], line[2]
                inputs.append([int(a),  int(b), int(c)])
             counter == 0 counter 0 line = input().strip() line input().strip() ().strip () input strip size = int(line) size int(line) int line line = input().strip().split() line input().strip().split() ().strip().split ().strip() ().strip () input strip split a, b, c = line[0], line[1], line[2] a line[0] line 0 b line[1] line 1 c line[2] line 2 inputs.append([int(a),  int(b), int(c)]) inputs.append inputs append [int(a),  int(b), int(c)] int(a) int a int(b) int b int(c) int c counter += 1 counter 1 return inputs inputs def triangle(inputs):
    f = lambda x: x * x
    inputs = list(map(f, inputs))
    # print(inputs)
    a, b, c = inputs[0], inputs[1], inputs[2]
    if a + b == c:
        return True
    elif a + c == b:
        return True
    elif b + c == a:
        return True
    else:
        return False triangle f = lambda x: x * x f lambda x: x * x x * x x x x inputs = list(map(f, inputs)) inputs list(map(f, inputs)) list map(f, inputs) map f inputs a, b, c = inputs[0], inputs[1], inputs[2] a inputs[0] inputs 0 b inputs[1] inputs 1 c inputs[2] inputs 2 if a + b == c:
        return True
    elif a + c == b:
        return True
    elif b + c == a:
        return True
    else:
        return False a + b == c a + b a b c return True True elif a + c == b:
        return True
     a + c == b a + c a c b return True True elif b + c == a:
        return True
     b + c == a b + c b c a return True True return False False inputs inputs if __name__ == '__main__':
    inputs = read_prob()
    for inp in inputs:
        if triangle(inp):
            print("YES")
        else:
            print("NO") __name__ == '__main__' __name__ '__main__' inputs = read_prob() inputs read_prob() read_prob for inp in inputs:
        if triangle(inp):
            print("YES")
        else:
            print("NO") inp inputs if triangle(inp):
            print("YES")
        else:
            print("NO") triangle(inp) triangle inp print("YES") print "YES" print("NO") print "NO" def triangle(inputs):
    f = lambda x: x * x
    inputs = list(map(f, inputs))
    # print(inputs)
    a, b, c = inputs[0], inputs[1], inputs[2]
    if a + b == c:
        return True
    elif a + c == b:
        return True
    elif b + c == a:
        return True
    else:
        return False def triangle(inputs):
    f = lambda x: x * x
    inputs = list(map(f, inputs))
    # print(inputs)
    a, b, c = inputs[0], inputs[1], inputs[2]
    if a + b == c:
        return True
    elif a + c == b:
        return True
    elif b + c == a:
        return True
    else:
        return False triangle def read_prob():
    inputs = []
    try:
        counter = 0
        while True:
            if counter == 0:
                line = input().strip()
                size = int(line)
            else:
                line = input().strip().split()
                a, b, c = line[0], line[1], line[2]
                inputs.append([int(a),  int(b), int(c)])
            counter += 1
    except EOFError:
        pass
    return inputs def read_prob():
    inputs = []
    try:
        counter = 0
        while True:
            if counter == 0:
                line = input().strip()
                size = int(line)
            else:
                line = input().strip().split()
                a, b, c = line[0], line[1], line[2]
                inputs.append([int(a),  int(b), int(c)])
            counter += 1
    except EOFError:
        pass
    return inputs read_prob inputs = read_prob() read_prob() inputs
import collections
import sys

def read_prob():
    inputs = []
    try:
        counter = 0
        while True:
            if counter == 0:
                line = input().strip()
                size = int(line)
            else:
                line = input().strip().split()
                a, b, c = line[0], line[1], line[2]
                inputs.append([int(a),  int(b), int(c)])
            counter += 1
    except EOFError:
        pass
    return inputs

def triangle(inputs):
    f = lambda x: x * x
    inputs = list(map(f, inputs))
    # print(inputs)
    a, b, c = inputs[0], inputs[1], inputs[2]
    if a + b == c:
        return True
    elif a + c == b:
        return True
    elif b + c == a:
        return True
    else:
        return False

if __name__ == '__main__':
    inputs = read_prob()
    for inp in inputs:
        if triangle(inp):
            print("YES")
        else:
            print("NO")

