import sys;
#from me.io import dup_file_stdin

#@dup_file_stdin
def solve():
    n=int(sys.stdin.readline())
    for i in range(n):
        x=[int(num) for num in sys.stdin.readline().split(' ')]
        x.sort();
        if(x[0]**2+x[1]**2==x[2]**2): print("YES")
        else :print("NO")
solve() import sys sys def solve():
    n=int(sys.stdin.readline())
    for i in range(n):
        x=[int(num) for num in sys.stdin.readline().split(' ')]
        x.sort();
        if(x[0]**2+x[1]**2==x[2]**2): print("YES")
        else :print("NO") solve n=int(sys.stdin.readline()) n int(sys.stdin.readline()) int sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline for i in range(n):
        x=[int(num) for num in sys.stdin.readline().split(' ')]
        x.sort();
        if(x[0]**2+x[1]**2==x[2]**2): print("YES")
        else :print("NO") i range(n) range n int(num) for num in sys.stdin.readline().split(' ') for num in sys.stdin.readline().split(' ') num sys.stdin.readline().split(' ') sys.stdin.readline().split sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline split ' ' for num in sys.stdin.readline().split(' ') int(num) int num x=[int(num) for num in sys.stdin.readline().split(' ')] x [int(num) for num in sys.stdin.readline().split(' ')] x.sort() x.sort x sort if(x[0]**2+x[1]**2==x[2]**2): print("YES")
        else :print("NO") x[0]**2+x[1]**2==x[2]**2 x[0]**2+x[1]**2 x[0]**2 x[0] x 0 2 x[1]**2 x[1] x 1 2 x[2]**2 x[2] x 2 2 solve() solve def solve():
    n=int(sys.stdin.readline())
    for i in range(n):
        x=[int(num) for num in sys.stdin.readline().split(' ')]
        x.sort();
        if(x[0]**2+x[1]**2==x[2]**2): print("YES")
        else :print("NO") def solve():
    n=int(sys.stdin.readline())
    for i in range(n):
        x=[int(num) for num in sys.stdin.readline().split(' ')]
        x.sort();
        if(x[0]**2+x[1]**2==x[2]**2): print("YES")
        else :print("NO") solve
import sys;
#from me.io import dup_file_stdin

#@dup_file_stdin
def solve():
    n=int(sys.stdin.readline())
    for i in range(n):
        x=[int(num) for num in sys.stdin.readline().split(' ')]
        x.sort();
        if(x[0]**2+x[1]**2==x[2]**2): print("YES")
        else :print("NO")
solve()