#coding:UTF-8
def Rec(N,List):
    for i in range(N):
        a=int(List[i].split(" ")[0])
        b=int(List[i].split(" ")[1])
        c=int(List[i].split(" ")[2])
        if a*a+b*b==c*c or a*a+c*c==b*b or b*b+c*c==a*a:
            print("YES")
        else:
            print("NO")

if __name__=="__main__":
    List=[]
    N=int(input())
    for i in range(N):
        List.append(input())
    Rec(N,List) def Rec(N,List):
    for i in range(N):
        a=int(List[i].split(" ")[0])
        b=int(List[i].split(" ")[1])
        c=int(List[i].split(" ")[2])
        if a*a+b*b==c*c or a*a+c*c==b*b or b*b+c*c==a*a:
            print("YES")
        else:
            print("NO") Rec for i in range(N):
        a=int(List[i].split(" ")[0])
        b=int(List[i].split(" ")[1])
        c=int(List[i].split(" ")[2])
        if a*a+b*b==c*c or a*a+c*c==b*b or b*b+c*c==a*a:
            print("YES")
        else:
            print("NO") i range(N) range N a=int(List[i].split(" ")[0]) a int(List[i].split(" ")[0]) int List[i].split(" ")[0] [i].split(" ") [i].split [i] List i split " " 0 b=int(List[i].split(" ")[1]) b int(List[i].split(" ")[1]) int List[i].split(" ")[1] [i].split(" ") [i].split [i] List i split " " 1 c=int(List[i].split(" ")[2]) c int(List[i].split(" ")[2]) int List[i].split(" ")[2] [i].split(" ") [i].split [i] List i split " " 2 if a*a+b*b==c*c or a*a+c*c==b*b or b*b+c*c==a*a:
            print("YES")
        else:
            print("NO") a*a+b*b==c*c or a*a+c*c==b*b or b*b+c*c==a*a a*a+b*b==c*c or a*a+c*c==b*b a*a+b*b==c*c a*a+b*b a*a a a b*b b b c*c c c a*a+c*c==b*b a*a+c*c a*a a a c*c c c b*b b b b*b+c*c==a*a b*b+c*c b*b b b c*c c c a*a a a print("YES") print "YES" print("NO") print "NO" N N List List if __name__=="__main__":
    List=[]
    N=int(input())
    for i in range(N):
        List.append(input())
    Rec(N,List) __name__=="__main__" __name__ "__main__" List=[] List [] N=int(input()) N int(input()) int input() input for i in range(N):
        List.append(input())
     i range(N) range N List.append(input()) List.append List append input() input Rec(N,List) Rec N List def Rec(N,List):
    for i in range(N):
        a=int(List[i].split(" ")[0])
        b=int(List[i].split(" ")[1])
        c=int(List[i].split(" ")[2])
        if a*a+b*b==c*c or a*a+c*c==b*b or b*b+c*c==a*a:
            print("YES")
        else:
            print("NO") def Rec(N,List):
    for i in range(N):
        a=int(List[i].split(" ")[0])
        b=int(List[i].split(" ")[1])
        c=int(List[i].split(" ")[2])
        if a*a+b*b==c*c or a*a+c*c==b*b or b*b+c*c==a*a:
            print("YES")
        else:
            print("NO") Rec N=int(input()) int(input()) N List=[] [] List
#coding:UTF-8
def Rec(N,List):
    for i in range(N):
        a=int(List[i].split(" ")[0])
        b=int(List[i].split(" ")[1])
        c=int(List[i].split(" ")[2])
        if a*a+b*b==c*c or a*a+c*c==b*b or b*b+c*c==a*a:
            print("YES")
        else:
            print("NO")

if __name__=="__main__":
    List=[]
    N=int(input())
    for i in range(N):
        List.append(input())
    Rec(N,List)