import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int x = s.nextInt();
        byte[] a = new byte[3];
        while(s.hasNext()){
            for(int i=0;i<3;i++)
                a[i] = s.nextByte();                
            Arrays.sort(a);
            if(a[2]*a[2] == a[0]*a[0] + a[1]*a[1])
                System.out.println("YES");
            else
                System.out.println("NO");
        }
        
    }
} import java.util.*; util.* java public class Main {

    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int x = s.nextInt();
        byte[] a = new byte[3];
        while(s.hasNext()){
            for(int i=0;i<3;i++)
                a[i] = s.nextByte();                
            Arrays.sort(a);
            if(a[2]*a[2] == a[0]*a[0] + a[1]*a[1])
                System.out.println("YES");
            else
                System.out.println("NO");
        }
        
    }
} Main public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int x = s.nextInt();
        byte[] a = new byte[3];
        while(s.hasNext()){
            for(int i=0;i<3;i++)
                a[i] = s.nextByte();                
            Arrays.sort(a);
            if(a[2]*a[2] == a[0]*a[0] + a[1]*a[1])
                System.out.println("YES");
            else
                System.out.println("NO");
        }
        
    } main {
        Scanner s = new Scanner(System.in);
        int x = s.nextInt();
        byte[] a = new byte[3];
        while(s.hasNext()){
            for(int i=0;i<3;i++)
                a[i] = s.nextByte();                
            Arrays.sort(a);
            if(a[2]*a[2] == a[0]*a[0] + a[1]*a[1])
                System.out.println("YES");
            else
                System.out.println("NO");
        }
        
    } Scanner s = new Scanner(System.in); s new Scanner(System.in) int x = s.nextInt(); x s.nextInt() s.nextInt s byte[] a = new byte[3]; a new byte[3] 3 while(s.hasNext()){
            for(int i=0;i<3;i++)
                a[i] = s.nextByte();                
            Arrays.sort(a);
            if(a[2]*a[2] == a[0]*a[0] + a[1]*a[1])
                System.out.println("YES");
            else
                System.out.println("NO");
        } s.hasNext() s.hasNext s {
            for(int i=0;i<3;i++)
                a[i] = s.nextByte();                
            Arrays.sort(a);
            if(a[2]*a[2] == a[0]*a[0] + a[1]*a[1])
                System.out.println("YES");
            else
                System.out.println("NO");
        } for(int i=0;i<3;i++)
                a[i] = s.nextByte(); int i=0; int i=0; i 0 i<3 i 3 i++ i++ i a[i] = s.nextByte(); a[i] = s.nextByte() a[i] a i s.nextByte() s.nextByte s Arrays.sort(a) Arrays.sort Arrays a if(a[2]*a[2] == a[0]*a[0] + a[1]*a[1])
                System.out.println("YES");
            else
                System.out.println("NO"); a[2]*a[2] == a[0]*a[0] + a[1]*a[1] a[2]*a[2] a[2] a 2 a[2] a 2 a[0]*a[0] + a[1]*a[1] a[0]*a[0] a[0] a 0 a[0] a 0 a[1]*a[1] a[1] a 1 a[1] a 1 System.out.println("YES") System.out.println System.out System System.out "YES" 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) {
        Scanner s = new Scanner(System.in);
        int x = s.nextInt();
        byte[] a = new byte[3];
        while(s.hasNext()){
            for(int i=0;i<3;i++)
                a[i] = s.nextByte();                
            Arrays.sort(a);
            if(a[2]*a[2] == a[0]*a[0] + a[1]*a[1])
                System.out.println("YES");
            else
                System.out.println("NO");
        }
        
    }
} public class Main {

    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int x = s.nextInt();
        byte[] a = new byte[3];
        while(s.hasNext()){
            for(int i=0;i<3;i++)
                a[i] = s.nextByte();                
            Arrays.sort(a);
            if(a[2]*a[2] == a[0]*a[0] + a[1]*a[1])
                System.out.println("YES");
            else
                System.out.println("NO");
        }
        
    }
} Main
import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int x = s.nextInt();
        byte[] a = new byte[3];
        while(s.hasNext()){
            for(int i=0;i<3;i++)
                a[i] = s.nextByte();                
            Arrays.sort(a);
            if(a[2]*a[2] == a[0]*a[0] + a[1]*a[1])
                System.out.println("YES");
            else
                System.out.println("NO");
        }
        
    }
}