
import java.io.*;
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int kosu = sc.nextInt();
        int hen [] = new int [3];

        for(int j=0; j<kosu; j++ ){
            for(int k=0; k<3; k++){
                int len = sc.nextInt();
                 hen[k] = len*len;
            }
             Arrays.sort(hen);
            
            if((hen[0] + hen[1]) == hen[2]){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }
            
        }

    }
    
    } import java.io.*; io.* java import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int kosu = sc.nextInt();
        int hen [] = new int [3];

        for(int j=0; j<kosu; j++ ){
            for(int k=0; k<3; k++){
                int len = sc.nextInt();
                 hen[k] = len*len;
            }
             Arrays.sort(hen);
            
            if((hen[0] + hen[1]) == hen[2]){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }
            
        }

    }
    
    } Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int kosu = sc.nextInt();
        int hen [] = new int [3];

        for(int j=0; j<kosu; j++ ){
            for(int k=0; k<3; k++){
                int len = sc.nextInt();
                 hen[k] = len*len;
            }
             Arrays.sort(hen);
            
            if((hen[0] + hen[1]) == hen[2]){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }
            
        }

    } main {
        Scanner sc = new Scanner(System.in);
        int kosu = sc.nextInt();
        int hen [] = new int [3];

        for(int j=0; j<kosu; j++ ){
            for(int k=0; k<3; k++){
                int len = sc.nextInt();
                 hen[k] = len*len;
            }
             Arrays.sort(hen);
            
            if((hen[0] + hen[1]) == hen[2]){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }
            
        }

    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int kosu = sc.nextInt(); kosu sc.nextInt() sc.nextInt sc int hen [] = new int [3]; hen new int [3] 3 for(int j=0; j<kosu; j++ ){
            for(int k=0; k<3; k++){
                int len = sc.nextInt();
                 hen[k] = len*len;
            }
             Arrays.sort(hen);
            
            if((hen[0] + hen[1]) == hen[2]){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }
            
        } int j=0; int j=0; j 0 j<kosu j kosu j++ j++ j {
            for(int k=0; k<3; k++){
                int len = sc.nextInt();
                 hen[k] = len*len;
            }
             Arrays.sort(hen);
            
            if((hen[0] + hen[1]) == hen[2]){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }
            
        } {
            for(int k=0; k<3; k++){
                int len = sc.nextInt();
                 hen[k] = len*len;
            }
             Arrays.sort(hen);
            
            if((hen[0] + hen[1]) == hen[2]){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }
            
        } for(int k=0; k<3; k++){
                int len = sc.nextInt();
                 hen[k] = len*len;
            } int k=0; int k=0; k 0 k<3 k 3 k++ k++ k {
                int len = sc.nextInt();
                 hen[k] = len*len;
            } {
                int len = sc.nextInt();
                 hen[k] = len*len;
            } int len = sc.nextInt(); len sc.nextInt() sc.nextInt sc hen[k] = len*len hen[k] hen k len*len len len Arrays.sort(hen) Arrays.sort Arrays hen if((hen[0] + hen[1]) == hen[2]){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            } (hen[0] + hen[1]) == hen[2] (hen[0] + hen[1]) hen[0] hen 0 hen[1] hen 1 hen[2] hen 2 {
                System.out.println("YES");
            } System.out.println("YES") System.out.println System.out System System.out "YES" {
                System.out.println("NO");
            } System.out.println("NO") System.out.println System.out System System.out "NO" String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int kosu = sc.nextInt();
        int hen [] = new int [3];

        for(int j=0; j<kosu; j++ ){
            for(int k=0; k<3; k++){
                int len = sc.nextInt();
                 hen[k] = len*len;
            }
             Arrays.sort(hen);
            
            if((hen[0] + hen[1]) == hen[2]){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }
            
        }

    }
    
    } public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int kosu = sc.nextInt();
        int hen [] = new int [3];

        for(int j=0; j<kosu; j++ ){
            for(int k=0; k<3; k++){
                int len = sc.nextInt();
                 hen[k] = len*len;
            }
             Arrays.sort(hen);
            
            if((hen[0] + hen[1]) == hen[2]){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }
            
        }

    }
    
    } Main

import java.io.*;
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int kosu = sc.nextInt();
        int hen [] = new int [3];

        for(int j=0; j<kosu; j++ ){
            for(int k=0; k<3; k++){
                int len = sc.nextInt();
                 hen[k] = len*len;
            }
             Arrays.sort(hen);
            
            if((hen[0] + hen[1]) == hen[2]){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }
            
        }

    }
    
    }