import java.util.Scanner;

class Main{
	public static void main(String args[]){
		Scanner scan = new Scanner(System.in);
		int num = scan.nextInt();
		int i,maxSide;
		int[] side = new int[3];
		
		for(i=0;i<num;i++){
			side[0] = scan.nextInt();
			side[1] = scan.nextInt();
			side[2] = scan.nextInt();
			
			maxSide = Math.max(side[0],side[1]);
			maxSide = Math.max(maxSide,side[2]);
			
			if(maxSide == side[0]){
				if(side[0]*side[0] == side[1]*side[1]+side[2]*side[2]){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
			}else if(maxSide == side[1]){
				if(side[1]*side[1] == side[0]*side[0]+side[2]*side[2]){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
			
			}else{
				if(side[2]*side[2] == side[0]*side[0]+side[1]*side[1]){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
			}
		}
	}
} import java.util.Scanner; Scanner java.util class Main{
	public static void main(String args[]){
		Scanner scan = new Scanner(System.in);
		int num = scan.nextInt();
		int i,maxSide;
		int[] side = new int[3];
		
		for(i=0;i<num;i++){
			side[0] = scan.nextInt();
			side[1] = scan.nextInt();
			side[2] = scan.nextInt();
			
			maxSide = Math.max(side[0],side[1]);
			maxSide = Math.max(maxSide,side[2]);
			
			if(maxSide == side[0]){
				if(side[0]*side[0] == side[1]*side[1]+side[2]*side[2]){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
			}else if(maxSide == side[1]){
				if(side[1]*side[1] == side[0]*side[0]+side[2]*side[2]){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
			
			}else{
				if(side[2]*side[2] == side[0]*side[0]+side[1]*side[1]){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
			}
		}
	}
} Main public static void main(String args[]){
		Scanner scan = new Scanner(System.in);
		int num = scan.nextInt();
		int i,maxSide;
		int[] side = new int[3];
		
		for(i=0;i<num;i++){
			side[0] = scan.nextInt();
			side[1] = scan.nextInt();
			side[2] = scan.nextInt();
			
			maxSide = Math.max(side[0],side[1]);
			maxSide = Math.max(maxSide,side[2]);
			
			if(maxSide == side[0]){
				if(side[0]*side[0] == side[1]*side[1]+side[2]*side[2]){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
			}else if(maxSide == side[1]){
				if(side[1]*side[1] == side[0]*side[0]+side[2]*side[2]){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
			
			}else{
				if(side[2]*side[2] == side[0]*side[0]+side[1]*side[1]){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
			}
		}
	} main {
		Scanner scan = new Scanner(System.in);
		int num = scan.nextInt();
		int i,maxSide;
		int[] side = new int[3];
		
		for(i=0;i<num;i++){
			side[0] = scan.nextInt();
			side[1] = scan.nextInt();
			side[2] = scan.nextInt();
			
			maxSide = Math.max(side[0],side[1]);
			maxSide = Math.max(maxSide,side[2]);
			
			if(maxSide == side[0]){
				if(side[0]*side[0] == side[1]*side[1]+side[2]*side[2]){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
			}else if(maxSide == side[1]){
				if(side[1]*side[1] == side[0]*side[0]+side[2]*side[2]){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
			
			}else{
				if(side[2]*side[2] == side[0]*side[0]+side[1]*side[1]){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
			}
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int num = scan.nextInt(); num scan.nextInt() scan.nextInt scan int i i maxSide; maxSide int[] side = new int[3]; side new int[3] 3 for(i=0;i<num;i++){
			side[0] = scan.nextInt();
			side[1] = scan.nextInt();
			side[2] = scan.nextInt();
			
			maxSide = Math.max(side[0],side[1]);
			maxSide = Math.max(maxSide,side[2]);
			
			if(maxSide == side[0]){
				if(side[0]*side[0] == side[1]*side[1]+side[2]*side[2]){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
			}else if(maxSide == side[1]){
				if(side[1]*side[1] == side[0]*side[0]+side[2]*side[2]){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
			
			}else{
				if(side[2]*side[2] == side[0]*side[0]+side[1]*side[1]){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
			}
		} i=0; i=0 i 0 i<num i num i++ i++ i {
			side[0] = scan.nextInt();
			side[1] = scan.nextInt();
			side[2] = scan.nextInt();
			
			maxSide = Math.max(side[0],side[1]);
			maxSide = Math.max(maxSide,side[2]);
			
			if(maxSide == side[0]){
				if(side[0]*side[0] == side[1]*side[1]+side[2]*side[2]){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
			}else if(maxSide == side[1]){
				if(side[1]*side[1] == side[0]*side[0]+side[2]*side[2]){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
			
			}else{
				if(side[2]*side[2] == side[0]*side[0]+side[1]*side[1]){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
			}
		} {
			side[0] = scan.nextInt();
			side[1] = scan.nextInt();
			side[2] = scan.nextInt();
			
			maxSide = Math.max(side[0],side[1]);
			maxSide = Math.max(maxSide,side[2]);
			
			if(maxSide == side[0]){
				if(side[0]*side[0] == side[1]*side[1]+side[2]*side[2]){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
			}else if(maxSide == side[1]){
				if(side[1]*side[1] == side[0]*side[0]+side[2]*side[2]){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
			
			}else{
				if(side[2]*side[2] == side[0]*side[0]+side[1]*side[1]){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
			}
		} side[0] = scan.nextInt() side[0] side 0 scan.nextInt() scan.nextInt scan side[1] = scan.nextInt() side[1] side 1 scan.nextInt() scan.nextInt scan side[2] = scan.nextInt() side[2] side 2 scan.nextInt() scan.nextInt scan maxSide = Math.max(side[0],side[1]) maxSide Math.max(side[0],side[1]) Math.max Math side[0] side 0 side[1] side 1 maxSide = Math.max(maxSide,side[2]) maxSide Math.max(maxSide,side[2]) Math.max Math maxSide side[2] side 2 if(maxSide == side[0]){
				if(side[0]*side[0] == side[1]*side[1]+side[2]*side[2]){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
			}else if(maxSide == side[1]){
				if(side[1]*side[1] == side[0]*side[0]+side[2]*side[2]){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
			
			}else{
				if(side[2]*side[2] == side[0]*side[0]+side[1]*side[1]){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
			} maxSide == side[0] maxSide side[0] side 0 {
				if(side[0]*side[0] == side[1]*side[1]+side[2]*side[2]){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
			} if(side[0]*side[0] == side[1]*side[1]+side[2]*side[2]){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				} side[0]*side[0] == side[1]*side[1]+side[2]*side[2] side[0]*side[0] side[0] side 0 side[0] side 0 side[1]*side[1]+side[2]*side[2] side[1]*side[1] side[1] side 1 side[1] side 1 side[2]*side[2] side[2] side 2 side[2] side 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" if(maxSide == side[1]){
				if(side[1]*side[1] == side[0]*side[0]+side[2]*side[2]){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
			
			}else{
				if(side[2]*side[2] == side[0]*side[0]+side[1]*side[1]){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
			} maxSide == side[1] maxSide side[1] side 1 {
				if(side[1]*side[1] == side[0]*side[0]+side[2]*side[2]){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
			
			} if(side[1]*side[1] == side[0]*side[0]+side[2]*side[2]){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				} side[1]*side[1] == side[0]*side[0]+side[2]*side[2] side[1]*side[1] side[1] side 1 side[1] side 1 side[0]*side[0]+side[2]*side[2] side[0]*side[0] side[0] side 0 side[0] side 0 side[2]*side[2] side[2] side 2 side[2] side 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" {
				if(side[2]*side[2] == side[0]*side[0]+side[1]*side[1]){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
			} if(side[2]*side[2] == side[0]*side[0]+side[1]*side[1]){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				} side[2]*side[2] == side[0]*side[0]+side[1]*side[1] side[2]*side[2] side[2] side 2 side[2] side 2 side[0]*side[0]+side[1]*side[1] side[0]*side[0] side[0] side 0 side[0] side 0 side[1]*side[1] side[1] side 1 side[1] side 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" String args[] args
import java.util.Scanner;

class Main{
	public static void main(String args[]){
		Scanner scan = new Scanner(System.in);
		int num = scan.nextInt();
		int i,maxSide;
		int[] side = new int[3];
		
		for(i=0;i<num;i++){
			side[0] = scan.nextInt();
			side[1] = scan.nextInt();
			side[2] = scan.nextInt();
			
			maxSide = Math.max(side[0],side[1]);
			maxSide = Math.max(maxSide,side[2]);
			
			if(maxSide == side[0]){
				if(side[0]*side[0] == side[1]*side[1]+side[2]*side[2]){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
			}else if(maxSide == side[1]){
				if(side[1]*side[1] == side[0]*side[0]+side[2]*side[2]){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
			
			}else{
				if(side[2]*side[2] == side[0]*side[0]+side[1]*side[1]){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
			}
		}
	}
}