//Is it a Right Triangle?
import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        @SuppressWarnings("resource")
        Scanner sc = new Scanner(System.in);
        
        String ans[] = new String[1000];
        
        int set = sc.nextInt();
        int i = 0;
        for(; i<set; i++) {
            int a = sc.nextInt();
            int b = sc.nextInt();
            int c = sc.nextInt();
            
            if(a*a==b*b+c*c || a*a+b*b==c*c || a*a+c*c==b*b) {
                ans[i] = "YES";
            }else {
                ans[i] = "NO";
            }
        }
        //System.out.println("i="+i);
        for(int j=0; j<i; j++) {
            System.out.println(ans[j]);
        }
    }
} import java.util.Scanner; Scanner java.util class Main {
    public static void main(String[] args) {
        @SuppressWarnings("resource")
        Scanner sc = new Scanner(System.in);
        
        String ans[] = new String[1000];
        
        int set = sc.nextInt();
        int i = 0;
        for(; i<set; i++) {
            int a = sc.nextInt();
            int b = sc.nextInt();
            int c = sc.nextInt();
            
            if(a*a==b*b+c*c || a*a+b*b==c*c || a*a+c*c==b*b) {
                ans[i] = "YES";
            }else {
                ans[i] = "NO";
            }
        }
        //System.out.println("i="+i);
        for(int j=0; j<i; j++) {
            System.out.println(ans[j]);
        }
    }
} Main public static void main(String[] args) {
        @SuppressWarnings("resource")
        Scanner sc = new Scanner(System.in);
        
        String ans[] = new String[1000];
        
        int set = sc.nextInt();
        int i = 0;
        for(; i<set; i++) {
            int a = sc.nextInt();
            int b = sc.nextInt();
            int c = sc.nextInt();
            
            if(a*a==b*b+c*c || a*a+b*b==c*c || a*a+c*c==b*b) {
                ans[i] = "YES";
            }else {
                ans[i] = "NO";
            }
        }
        //System.out.println("i="+i);
        for(int j=0; j<i; j++) {
            System.out.println(ans[j]);
        }
    } main {
        @SuppressWarnings("resource")
        Scanner sc = new Scanner(System.in);
        
        String ans[] = new String[1000];
        
        int set = sc.nextInt();
        int i = 0;
        for(; i<set; i++) {
            int a = sc.nextInt();
            int b = sc.nextInt();
            int c = sc.nextInt();
            
            if(a*a==b*b+c*c || a*a+b*b==c*c || a*a+c*c==b*b) {
                ans[i] = "YES";
            }else {
                ans[i] = "NO";
            }
        }
        //System.out.println("i="+i);
        for(int j=0; j<i; j++) {
            System.out.println(ans[j]);
        }
    } @SuppressWarnings("resource")
        Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String ans[] = new String[1000]; ans new String[1000] 1000 int set = sc.nextInt(); set sc.nextInt() sc.nextInt sc int i = 0; i 0 for(; i<set; i++) {
            int a = sc.nextInt();
            int b = sc.nextInt();
            int c = sc.nextInt();
            
            if(a*a==b*b+c*c || a*a+b*b==c*c || a*a+c*c==b*b) {
                ans[i] = "YES";
            }else {
                ans[i] = "NO";
            }
        } ; i<set i set i++ i++ i {
            int a = sc.nextInt();
            int b = sc.nextInt();
            int c = sc.nextInt();
            
            if(a*a==b*b+c*c || a*a+b*b==c*c || a*a+c*c==b*b) {
                ans[i] = "YES";
            }else {
                ans[i] = "NO";
            }
        } {
            int a = sc.nextInt();
            int b = sc.nextInt();
            int c = sc.nextInt();
            
            if(a*a==b*b+c*c || a*a+b*b==c*c || a*a+c*c==b*b) {
                ans[i] = "YES";
            }else {
                ans[i] = "NO";
            }
        } int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc int c = sc.nextInt(); c sc.nextInt() sc.nextInt sc if(a*a==b*b+c*c || a*a+b*b==c*c || a*a+c*c==b*b) {
                ans[i] = "YES";
            }else {
                ans[i] = "NO";
            } a*a==b*b+c*c || a*a+b*b==c*c || a*a+c*c==b*b a*a==b*b+c*c || a*a+b*b==c*c || a*a+c*c==b*b a*a==b*b+c*c a*a a a b*b+c*c b*b b b c*c c c 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 {
                ans[i] = "YES";
            } ans[i] = "YES" ans[i] ans i "YES" {
                ans[i] = "NO";
            } ans[i] = "NO" ans[i] ans i "NO" for(int j=0; j<i; j++) {
            System.out.println(ans[j]);
        } int j=0; int j=0; j 0 j<i j i j++ j++ j {
            System.out.println(ans[j]);
        } {
            System.out.println(ans[j]);
        } System.out.println(ans[j]) System.out.println System.out System System.out ans[j] ans j String[] args args
//Is it a Right Triangle?
import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        @SuppressWarnings("resource")
        Scanner sc = new Scanner(System.in);
        
        String ans[] = new String[1000];
        
        int set = sc.nextInt();
        int i = 0;
        for(; i<set; i++) {
            int a = sc.nextInt();
            int b = sc.nextInt();
            int c = sc.nextInt();
            
            if(a*a==b*b+c*c || a*a+b*b==c*c || a*a+c*c==b*b) {
                ans[i] = "YES";
            }else {
                ans[i] = "NO";
            }
        }
        //System.out.println("i="+i);
        for(int j=0; j<i; j++) {
            System.out.println(ans[j]);
        }
    }
}