import java.util.Arrays;
import java.util.Scanner;



class Main{


    public static void main(String[] a){


        Scanner sc = new Scanner(System.in);

        int j = sc.nextInt();

        for(int i = 0; i < j; i++){


        	int[] d = new int[3];


        	for(int k = 0; k < 3; k++){
	        	d[k] = sc.nextInt();
	        }

        	Arrays.sort(d);

        	if(d[2] * d[2] == d[0] * d[0] + d[1] * d[1]){
        		System.out.println("YES");
        	}else{
        		System.out.println("NO");
        	}

        }

        sc.close();

   }


} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util class Main{


    public static void main(String[] a){


        Scanner sc = new Scanner(System.in);

        int j = sc.nextInt();

        for(int i = 0; i < j; i++){


        	int[] d = new int[3];


        	for(int k = 0; k < 3; k++){
	        	d[k] = sc.nextInt();
	        }

        	Arrays.sort(d);

        	if(d[2] * d[2] == d[0] * d[0] + d[1] * d[1]){
        		System.out.println("YES");
        	}else{
        		System.out.println("NO");
        	}

        }

        sc.close();

   }


} Main public static void main(String[] a){


        Scanner sc = new Scanner(System.in);

        int j = sc.nextInt();

        for(int i = 0; i < j; i++){


        	int[] d = new int[3];


        	for(int k = 0; k < 3; k++){
	        	d[k] = sc.nextInt();
	        }

        	Arrays.sort(d);

        	if(d[2] * d[2] == d[0] * d[0] + d[1] * d[1]){
        		System.out.println("YES");
        	}else{
        		System.out.println("NO");
        	}

        }

        sc.close();

   } main {


        Scanner sc = new Scanner(System.in);

        int j = sc.nextInt();

        for(int i = 0; i < j; i++){


        	int[] d = new int[3];


        	for(int k = 0; k < 3; k++){
	        	d[k] = sc.nextInt();
	        }

        	Arrays.sort(d);

        	if(d[2] * d[2] == d[0] * d[0] + d[1] * d[1]){
        		System.out.println("YES");
        	}else{
        		System.out.println("NO");
        	}

        }

        sc.close();

   } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int j = sc.nextInt(); j sc.nextInt() sc.nextInt sc for(int i = 0; i < j; i++){


        	int[] d = new int[3];


        	for(int k = 0; k < 3; k++){
	        	d[k] = sc.nextInt();
	        }

        	Arrays.sort(d);

        	if(d[2] * d[2] == d[0] * d[0] + d[1] * d[1]){
        		System.out.println("YES");
        	}else{
        		System.out.println("NO");
        	}

        } int i = 0; int i = 0; i 0 i < j i j i++ i++ i {


        	int[] d = new int[3];


        	for(int k = 0; k < 3; k++){
	        	d[k] = sc.nextInt();
	        }

        	Arrays.sort(d);

        	if(d[2] * d[2] == d[0] * d[0] + d[1] * d[1]){
        		System.out.println("YES");
        	}else{
        		System.out.println("NO");
        	}

        } {


        	int[] d = new int[3];


        	for(int k = 0; k < 3; k++){
	        	d[k] = sc.nextInt();
	        }

        	Arrays.sort(d);

        	if(d[2] * d[2] == d[0] * d[0] + d[1] * d[1]){
        		System.out.println("YES");
        	}else{
        		System.out.println("NO");
        	}

        } int[] d = new int[3]; d new int[3] 3 for(int k = 0; k < 3; k++){
	        	d[k] = sc.nextInt();
	        } int k = 0; int k = 0; k 0 k < 3 k 3 k++ k++ k {
	        	d[k] = sc.nextInt();
	        } {
	        	d[k] = sc.nextInt();
	        } d[k] = sc.nextInt() d[k] d k sc.nextInt() sc.nextInt sc Arrays.sort(d) Arrays.sort Arrays d if(d[2] * d[2] == d[0] * d[0] + d[1] * d[1]){
        		System.out.println("YES");
        	}else{
        		System.out.println("NO");
        	} d[2] * d[2] == d[0] * d[0] + d[1] * d[1] d[2] * d[2] d[2] d 2 d[2] d 2 d[0] * d[0] + d[1] * d[1] d[0] * d[0] d[0] d 0 d[0] d 0 d[1] * d[1] d[1] d 1 d[1] d 1 {
        		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" sc.close() sc.close sc String[] a a
import java.util.Arrays;
import java.util.Scanner;



class Main{


    public static void main(String[] a){


        Scanner sc = new Scanner(System.in);

        int j = sc.nextInt();

        for(int i = 0; i < j; i++){


        	int[] d = new int[3];


        	for(int k = 0; k < 3; k++){
	        	d[k] = sc.nextInt();
	        }

        	Arrays.sort(d);

        	if(d[2] * d[2] == d[0] * d[0] + d[1] * d[1]){
        		System.out.println("YES");
        	}else{
        		System.out.println("NO");
        	}

        }

        sc.close();

   }


}