import java.util.*;

class Main {
	public static void main (String [] args){
		printAns();	
	}

	static void isRightTriangle(int a, int b, int c){
		if(a*a + b*b == c*c) System.out.println("YES");
		else System.out.println("NO");
	}

	static void printAns(){
		Scanner sc = new Scanner(System.in);
		int set = sc.nextInt();
		int[] triangle = new int[3];

		for(int cnt=0; cnt<set; cnt++){
			for(int i=0; i<triangle.length; i++){
				triangle[i] = sc.nextInt();
			}
			sort(triangle);
			isRightTriangle(triangle[0], triangle[1], triangle[2]);
		}	
	}

	static void sort(int[] data){
		int min, tmp;
		for(int i=0; i<data.length; i++){
			min = i;
			for(int j=i+1; j<data.length; j++)
				if(data[min]>data[j]) min = j;
			tmp = data[i];
			data[i] = data[min];
			data[min] = tmp;
		}
	}	
} import java.util.*; util.* java class Main {
	public static void main (String [] args){
		printAns();	
	}

	static void isRightTriangle(int a, int b, int c){
		if(a*a + b*b == c*c) System.out.println("YES");
		else System.out.println("NO");
	}

	static void printAns(){
		Scanner sc = new Scanner(System.in);
		int set = sc.nextInt();
		int[] triangle = new int[3];

		for(int cnt=0; cnt<set; cnt++){
			for(int i=0; i<triangle.length; i++){
				triangle[i] = sc.nextInt();
			}
			sort(triangle);
			isRightTriangle(triangle[0], triangle[1], triangle[2]);
		}	
	}

	static void sort(int[] data){
		int min, tmp;
		for(int i=0; i<data.length; i++){
			min = i;
			for(int j=i+1; j<data.length; j++)
				if(data[min]>data[j]) min = j;
			tmp = data[i];
			data[i] = data[min];
			data[min] = tmp;
		}
	}	
} Main public static void main (String [] args){
		printAns();	
	} main {
		printAns();	
	} printAns() printAns String [] args args static void isRightTriangle(int a, int b, int c){
		if(a*a + b*b == c*c) System.out.println("YES");
		else System.out.println("NO");
	} isRightTriangle {
		if(a*a + b*b == c*c) System.out.println("YES");
		else System.out.println("NO");
	} if(a*a + b*b == c*c) System.out.println("YES");
		else System.out.println("NO"); a*a + b*b == c*c a*a + b*b a*a a a b*b b b c*c c c 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" int a a int b b int c c static void printAns(){
		Scanner sc = new Scanner(System.in);
		int set = sc.nextInt();
		int[] triangle = new int[3];

		for(int cnt=0; cnt<set; cnt++){
			for(int i=0; i<triangle.length; i++){
				triangle[i] = sc.nextInt();
			}
			sort(triangle);
			isRightTriangle(triangle[0], triangle[1], triangle[2]);
		}	
	} printAns {
		Scanner sc = new Scanner(System.in);
		int set = sc.nextInt();
		int[] triangle = new int[3];

		for(int cnt=0; cnt<set; cnt++){
			for(int i=0; i<triangle.length; i++){
				triangle[i] = sc.nextInt();
			}
			sort(triangle);
			isRightTriangle(triangle[0], triangle[1], triangle[2]);
		}	
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int set = sc.nextInt(); set sc.nextInt() sc.nextInt sc int[] triangle = new int[3]; triangle new int[3] 3 for(int cnt=0; cnt<set; cnt++){
			for(int i=0; i<triangle.length; i++){
				triangle[i] = sc.nextInt();
			}
			sort(triangle);
			isRightTriangle(triangle[0], triangle[1], triangle[2]);
		} int cnt=0; int cnt=0; cnt 0 cnt<set cnt set cnt++ cnt++ cnt {
			for(int i=0; i<triangle.length; i++){
				triangle[i] = sc.nextInt();
			}
			sort(triangle);
			isRightTriangle(triangle[0], triangle[1], triangle[2]);
		} {
			for(int i=0; i<triangle.length; i++){
				triangle[i] = sc.nextInt();
			}
			sort(triangle);
			isRightTriangle(triangle[0], triangle[1], triangle[2]);
		} for(int i=0; i<triangle.length; i++){
				triangle[i] = sc.nextInt();
			} int i=0; int i=0; i 0 i<triangle.length i triangle.length triangle triangle.length i++ i++ i {
				triangle[i] = sc.nextInt();
			} {
				triangle[i] = sc.nextInt();
			} triangle[i] = sc.nextInt() triangle[i] triangle i sc.nextInt() sc.nextInt sc sort(triangle) sort triangle isRightTriangle(triangle[0], triangle[1], triangle[2]) isRightTriangle triangle[0] triangle 0 triangle[1] triangle 1 triangle[2] triangle 2 static void sort(int[] data){
		int min, tmp;
		for(int i=0; i<data.length; i++){
			min = i;
			for(int j=i+1; j<data.length; j++)
				if(data[min]>data[j]) min = j;
			tmp = data[i];
			data[i] = data[min];
			data[min] = tmp;
		}
	} sort {
		int min, tmp;
		for(int i=0; i<data.length; i++){
			min = i;
			for(int j=i+1; j<data.length; j++)
				if(data[min]>data[j]) min = j;
			tmp = data[i];
			data[i] = data[min];
			data[min] = tmp;
		}
	} int min min tmp; tmp for(int i=0; i<data.length; i++){
			min = i;
			for(int j=i+1; j<data.length; j++)
				if(data[min]>data[j]) min = j;
			tmp = data[i];
			data[i] = data[min];
			data[min] = tmp;
		} int i=0; int i=0; i 0 i<data.length i data.length data data.length i++ i++ i {
			min = i;
			for(int j=i+1; j<data.length; j++)
				if(data[min]>data[j]) min = j;
			tmp = data[i];
			data[i] = data[min];
			data[min] = tmp;
		} {
			min = i;
			for(int j=i+1; j<data.length; j++)
				if(data[min]>data[j]) min = j;
			tmp = data[i];
			data[i] = data[min];
			data[min] = tmp;
		} min = i min i for(int j=i+1; j<data.length; j++)
				if(data[min]>data[j]) min = j; int j=i+1; int j=i+1; j i+1 i 1 j<data.length j data.length data data.length j++ j++ j if(data[min]>data[j]) min = j; if(data[min]>data[j]) min = j; data[min]>data[j] data[min] data min data[j] data j min = j min j tmp = data[i] tmp data[i] data i data[i] = data[min] data[i] data i data[min] data min data[min] = tmp data[min] data min tmp int[] data data
import java.util.*;

class Main {
	public static void main (String [] args){
		printAns();	
	}

	static void isRightTriangle(int a, int b, int c){
		if(a*a + b*b == c*c) System.out.println("YES");
		else System.out.println("NO");
	}

	static void printAns(){
		Scanner sc = new Scanner(System.in);
		int set = sc.nextInt();
		int[] triangle = new int[3];

		for(int cnt=0; cnt<set; cnt++){
			for(int i=0; i<triangle.length; i++){
				triangle[i] = sc.nextInt();
			}
			sort(triangle);
			isRightTriangle(triangle[0], triangle[1], triangle[2]);
		}	
	}

	static void sort(int[] data){
		int min, tmp;
		for(int i=0; i<data.length; i++){
			min = i;
			for(int j=i+1; j<data.length; j++)
				if(data[min]>data[j]) min = j;
			tmp = data[i];
			data[i] = data[min];
			data[min] = tmp;
		}
	}	
}