import java.util.List;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Scanner;

public class Main {
	public static void main(String[]args){
		IsitATriangle();
	}
	
	public static void IsitATriangle(){
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[]triangle = new int[3];
		
		for(int i=0;i<n;i++){
			for(int j=0;j<3;j++)triangle[j]=scan.nextInt();
			Arrays.sort(triangle);
			if(triangle[0]*triangle[0]+triangle[1]*triangle[1]==triangle[2]*triangle[2])
				System.out.println("YES");
			else System.out.println("NO");
		}
	}
} import java.util.List; List java.util import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays java.util import java.util.Collections; Collections java.util import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[]args){
		IsitATriangle();
	}
	
	public static void IsitATriangle(){
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[]triangle = new int[3];
		
		for(int i=0;i<n;i++){
			for(int j=0;j<3;j++)triangle[j]=scan.nextInt();
			Arrays.sort(triangle);
			if(triangle[0]*triangle[0]+triangle[1]*triangle[1]==triangle[2]*triangle[2])
				System.out.println("YES");
			else System.out.println("NO");
		}
	}
} Main public static void main(String[]args){
		IsitATriangle();
	} main {
		IsitATriangle();
	} IsitATriangle() IsitATriangle String[]args args public static void IsitATriangle(){
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[]triangle = new int[3];
		
		for(int i=0;i<n;i++){
			for(int j=0;j<3;j++)triangle[j]=scan.nextInt();
			Arrays.sort(triangle);
			if(triangle[0]*triangle[0]+triangle[1]*triangle[1]==triangle[2]*triangle[2])
				System.out.println("YES");
			else System.out.println("NO");
		}
	} IsitATriangle {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[]triangle = new int[3];
		
		for(int i=0;i<n;i++){
			for(int j=0;j<3;j++)triangle[j]=scan.nextInt();
			Arrays.sort(triangle);
			if(triangle[0]*triangle[0]+triangle[1]*triangle[1]==triangle[2]*triangle[2])
				System.out.println("YES");
			else System.out.println("NO");
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int[]triangle = new int[3]; triangle new int[3] 3 for(int i=0;i<n;i++){
			for(int j=0;j<3;j++)triangle[j]=scan.nextInt();
			Arrays.sort(triangle);
			if(triangle[0]*triangle[0]+triangle[1]*triangle[1]==triangle[2]*triangle[2])
				System.out.println("YES");
			else System.out.println("NO");
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			for(int j=0;j<3;j++)triangle[j]=scan.nextInt();
			Arrays.sort(triangle);
			if(triangle[0]*triangle[0]+triangle[1]*triangle[1]==triangle[2]*triangle[2])
				System.out.println("YES");
			else System.out.println("NO");
		} {
			for(int j=0;j<3;j++)triangle[j]=scan.nextInt();
			Arrays.sort(triangle);
			if(triangle[0]*triangle[0]+triangle[1]*triangle[1]==triangle[2]*triangle[2])
				System.out.println("YES");
			else System.out.println("NO");
		} for(int j=0;j<3;j++)triangle[j]=scan.nextInt(); int j=0; int j=0; j 0 j<3 j 3 j++ j++ j triangle[j]=scan.nextInt(); triangle[j]=scan.nextInt() triangle[j] triangle j scan.nextInt() scan.nextInt scan Arrays.sort(triangle) Arrays.sort Arrays triangle if(triangle[0]*triangle[0]+triangle[1]*triangle[1]==triangle[2]*triangle[2])
				System.out.println("YES");
			else System.out.println("NO"); triangle[0]*triangle[0]+triangle[1]*triangle[1]==triangle[2]*triangle[2] triangle[0]*triangle[0]+triangle[1]*triangle[1] triangle[0]*triangle[0] triangle[0] triangle 0 triangle[0] triangle 0 triangle[1]*triangle[1] triangle[1] triangle 1 triangle[1] triangle 1 triangle[2]*triangle[2] triangle[2] triangle 2 triangle[2] triangle 2 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" public class Main {
	public static void main(String[]args){
		IsitATriangle();
	}
	
	public static void IsitATriangle(){
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[]triangle = new int[3];
		
		for(int i=0;i<n;i++){
			for(int j=0;j<3;j++)triangle[j]=scan.nextInt();
			Arrays.sort(triangle);
			if(triangle[0]*triangle[0]+triangle[1]*triangle[1]==triangle[2]*triangle[2])
				System.out.println("YES");
			else System.out.println("NO");
		}
	}
} public class Main {
	public static void main(String[]args){
		IsitATriangle();
	}
	
	public static void IsitATriangle(){
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[]triangle = new int[3];
		
		for(int i=0;i<n;i++){
			for(int j=0;j<3;j++)triangle[j]=scan.nextInt();
			Arrays.sort(triangle);
			if(triangle[0]*triangle[0]+triangle[1]*triangle[1]==triangle[2]*triangle[2])
				System.out.println("YES");
			else System.out.println("NO");
		}
	}
} Main
import java.util.List;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Scanner;

public class Main {
	public static void main(String[]args){
		IsitATriangle();
	}
	
	public static void IsitATriangle(){
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[]triangle = new int[3];
		
		for(int i=0;i<n;i++){
			for(int j=0;j<3;j++)triangle[j]=scan.nextInt();
			Arrays.sort(triangle);
			if(triangle[0]*triangle[0]+triangle[1]*triangle[1]==triangle[2]*triangle[2])
				System.out.println("YES");
			else System.out.println("NO");
		}
	}
}