def solve():
    data = read()
    result = think(data)
    write(result)


def read():
    n = int(input())
    data = []
    for i in range(n):
        data.append(read_data())
    return data


def read_data():
    return list(map(int, input().split(' ')))


def think(data):
    result = []
    for d in data:
        if is_right_triangle(d):
            result.append('YES')
        else:
            result.append('NO')
    return result


def is_right_triangle(d):
    x, y, z = d[0], d[1], d[2]
    return (x ** 2 == y ** 2 + z ** 2) or (y ** 2 == z ** 2 + x ** 2) or (z ** 2 == x ** 2 + y ** 2)


def write(result):
    for r in result:
        print(r)


if __name__ == '__main__':
    solve() def solve():
    data = read()
    result = think(data)
    write(result) solve data = read() data read() read result = think(data) result think(data) think data write(result) write result def read():
    n = int(input())
    data = []
    for i in range(n):
        data.append(read_data())
    return data read n = int(input()) n int(input()) int input() input data = [] data [] for i in range(n):
        data.append(read_data())
     i range(n) range n data.append(read_data()) data.append data append read_data() read_data return data data def read_data():
    return list(map(int, input().split(' '))) read_data return list(map(int, input().split(' '))) list(map(int, input().split(' '))) list map(int, input().split(' ')) map int input().split(' ') ().split () input split ' ' def think(data):
    result = []
    for d in data:
        if is_right_triangle(d):
            result.append('YES')
        else:
            result.append('NO')
    return result think result = [] result [] for d in data:
        if is_right_triangle(d):
            result.append('YES')
        else:
            result.append('NO')
     d data if is_right_triangle(d):
            result.append('YES')
        else:
            result.append('NO')
     is_right_triangle(d) is_right_triangle d result.append('YES') result.append result append 'YES' result.append('NO') result.append result append 'NO' return result result data data def is_right_triangle(d):
    x, y, z = d[0], d[1], d[2]
    return (x ** 2 == y ** 2 + z ** 2) or (y ** 2 == z ** 2 + x ** 2) or (z ** 2 == x ** 2 + y ** 2) is_right_triangle x, y, z = d[0], d[1], d[2] x d[0] d 0 y d[1] d 1 z d[2] d 2 return (x ** 2 == y ** 2 + z ** 2) or (y ** 2 == z ** 2 + x ** 2) or (z ** 2 == x ** 2 + y ** 2) (x ** 2 == y ** 2 + z ** 2) or (y ** 2 == z ** 2 + x ** 2) or (z ** 2 == x ** 2 + y ** 2) (x ** 2 == y ** 2 + z ** 2) or (y ** 2 == z ** 2 + x ** 2) x ** 2 == y ** 2 + z ** 2 x ** 2 x 2 y ** 2 + z ** 2 y ** 2 y 2 z ** 2 z 2 y ** 2 == z ** 2 + x ** 2 y ** 2 y 2 z ** 2 + x ** 2 z ** 2 z 2 x ** 2 x 2 z ** 2 == x ** 2 + y ** 2 z ** 2 z 2 x ** 2 + y ** 2 x ** 2 x 2 y ** 2 y 2 d d def write(result):
    for r in result:
        print(r) write for r in result:
        print(r) r result print(r) print r result result if __name__ == '__main__':
    solve() __name__ == '__main__' __name__ '__main__' solve() solve def write(result):
    for r in result:
        print(r) def write(result):
    for r in result:
        print(r) write def read_data():
    return list(map(int, input().split(' '))) def read_data():
    return list(map(int, input().split(' '))) read_data def solve():
    data = read()
    result = think(data)
    write(result) def solve():
    data = read()
    result = think(data)
    write(result) solve def read():
    n = int(input())
    data = []
    for i in range(n):
        data.append(read_data())
    return data def read():
    n = int(input())
    data = []
    for i in range(n):
        data.append(read_data())
    return data read def is_right_triangle(d):
    x, y, z = d[0], d[1], d[2]
    return (x ** 2 == y ** 2 + z ** 2) or (y ** 2 == z ** 2 + x ** 2) or (z ** 2 == x ** 2 + y ** 2) def is_right_triangle(d):
    x, y, z = d[0], d[1], d[2]
    return (x ** 2 == y ** 2 + z ** 2) or (y ** 2 == z ** 2 + x ** 2) or (z ** 2 == x ** 2 + y ** 2) is_right_triangle def think(data):
    result = []
    for d in data:
        if is_right_triangle(d):
            result.append('YES')
        else:
            result.append('NO')
    return result def think(data):
    result = []
    for d in data:
        if is_right_triangle(d):
            result.append('YES')
        else:
            result.append('NO')
    return result think
def solve():
    data = read()
    result = think(data)
    write(result)


def read():
    n = int(input())
    data = []
    for i in range(n):
        data.append(read_data())
    return data


def read_data():
    return list(map(int, input().split(' ')))


def think(data):
    result = []
    for d in data:
        if is_right_triangle(d):
            result.append('YES')
        else:
            result.append('NO')
    return result


def is_right_triangle(d):
    x, y, z = d[0], d[1], d[2]
    return (x ** 2 == y ** 2 + z ** 2) or (y ** 2 == z ** 2 + x ** 2) or (z ** 2 == x ** 2 + y ** 2)


def write(result):
    for r in result:
        print(r)


if __name__ == '__main__':
    solve()
