import java.util.Arrays;
import java.util.Scanner;
import static java.lang.Math.*;
class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		int temp[]=new int[3];
		for(int i = 0;i < n; i++){
			for(int j = 0;j < 3; j++)	temp[j]=sc.nextInt();
			Arrays.sort(temp);
			
		
			if(temp[0]*temp[0]+temp[1]*temp[1]==temp[2]*temp[2])System.out.println("YES");
			else System.out.println("NO");

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

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

		}
	} main {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		int temp[]=new int[3];
		for(int i = 0;i < n; i++){
			for(int j = 0;j < 3; j++)	temp[j]=sc.nextInt();
			Arrays.sort(temp);
			
		
			if(temp[0]*temp[0]+temp[1]*temp[1]==temp[2]*temp[2])System.out.println("YES");
			else System.out.println("NO");

		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n=sc.nextInt(); n sc.nextInt() sc.nextInt sc int temp[]=new int[3]; temp new int[3] 3 for(int i = 0;i < n; i++){
			for(int j = 0;j < 3; j++)	temp[j]=sc.nextInt();
			Arrays.sort(temp);
			
		
			if(temp[0]*temp[0]+temp[1]*temp[1]==temp[2]*temp[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++)	temp[j]=sc.nextInt();
			Arrays.sort(temp);
			
		
			if(temp[0]*temp[0]+temp[1]*temp[1]==temp[2]*temp[2])System.out.println("YES");
			else System.out.println("NO");

		} {
			for(int j = 0;j < 3; j++)	temp[j]=sc.nextInt();
			Arrays.sort(temp);
			
		
			if(temp[0]*temp[0]+temp[1]*temp[1]==temp[2]*temp[2])System.out.println("YES");
			else System.out.println("NO");

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

		}
	}
}