import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
	public static void main(String[] args)throws IOException {
		BufferedReader br=new BufferedReader (new InputStreamReader(System.in));
		int n,s=0;
		String[] str;
		long[] hen=new long[3];
		n=Integer.parseInt(br.readLine());
		StringBuilder out=new StringBuilder();
		for(int i=0;i<n;i++){
			str=br.readLine().split(" ");
			long max=0;
			for(int j=0;j<3;j++){
				hen[j]=Integer.parseInt(str[j]);
				if(max<hen[j]){	max=hen[j];	s=j;}
			}
			hen[s]=0;
			if(max*max == hen[0]*hen[0]+hen[1]*hen[1]+hen[2]*hen[2]){
				out.append("YES" + "\n");
			}else out.append("NO"+"\n");
		}
		out.delete(out.length()-1,out.length());
		System.out.println(out);
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
	public static void main(String[] args)throws IOException {
		BufferedReader br=new BufferedReader (new InputStreamReader(System.in));
		int n,s=0;
		String[] str;
		long[] hen=new long[3];
		n=Integer.parseInt(br.readLine());
		StringBuilder out=new StringBuilder();
		for(int i=0;i<n;i++){
			str=br.readLine().split(" ");
			long max=0;
			for(int j=0;j<3;j++){
				hen[j]=Integer.parseInt(str[j]);
				if(max<hen[j]){	max=hen[j];	s=j;}
			}
			hen[s]=0;
			if(max*max == hen[0]*hen[0]+hen[1]*hen[1]+hen[2]*hen[2]){
				out.append("YES" + "\n");
			}else out.append("NO"+"\n");
		}
		out.delete(out.length()-1,out.length());
		System.out.println(out);
	}
} Main public static void main(String[] args)throws IOException {
		BufferedReader br=new BufferedReader (new InputStreamReader(System.in));
		int n,s=0;
		String[] str;
		long[] hen=new long[3];
		n=Integer.parseInt(br.readLine());
		StringBuilder out=new StringBuilder();
		for(int i=0;i<n;i++){
			str=br.readLine().split(" ");
			long max=0;
			for(int j=0;j<3;j++){
				hen[j]=Integer.parseInt(str[j]);
				if(max<hen[j]){	max=hen[j];	s=j;}
			}
			hen[s]=0;
			if(max*max == hen[0]*hen[0]+hen[1]*hen[1]+hen[2]*hen[2]){
				out.append("YES" + "\n");
			}else out.append("NO"+"\n");
		}
		out.delete(out.length()-1,out.length());
		System.out.println(out);
	} main {
		BufferedReader br=new BufferedReader (new InputStreamReader(System.in));
		int n,s=0;
		String[] str;
		long[] hen=new long[3];
		n=Integer.parseInt(br.readLine());
		StringBuilder out=new StringBuilder();
		for(int i=0;i<n;i++){
			str=br.readLine().split(" ");
			long max=0;
			for(int j=0;j<3;j++){
				hen[j]=Integer.parseInt(str[j]);
				if(max<hen[j]){	max=hen[j];	s=j;}
			}
			hen[s]=0;
			if(max*max == hen[0]*hen[0]+hen[1]*hen[1]+hen[2]*hen[2]){
				out.append("YES" + "\n");
			}else out.append("NO"+"\n");
		}
		out.delete(out.length()-1,out.length());
		System.out.println(out);
	} BufferedReader br=new BufferedReader (new InputStreamReader(System.in)); br new BufferedReader (new InputStreamReader(System.in)) int n n s=0; s 0 String[] str; str long[] hen=new long[3]; hen new long[3] 3 n=Integer.parseInt(br.readLine()) n Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br StringBuilder out=new StringBuilder(); out new StringBuilder() for(int i=0;i<n;i++){
			str=br.readLine().split(" ");
			long max=0;
			for(int j=0;j<3;j++){
				hen[j]=Integer.parseInt(str[j]);
				if(max<hen[j]){	max=hen[j];	s=j;}
			}
			hen[s]=0;
			if(max*max == hen[0]*hen[0]+hen[1]*hen[1]+hen[2]*hen[2]){
				out.append("YES" + "\n");
			}else out.append("NO"+"\n");
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			str=br.readLine().split(" ");
			long max=0;
			for(int j=0;j<3;j++){
				hen[j]=Integer.parseInt(str[j]);
				if(max<hen[j]){	max=hen[j];	s=j;}
			}
			hen[s]=0;
			if(max*max == hen[0]*hen[0]+hen[1]*hen[1]+hen[2]*hen[2]){
				out.append("YES" + "\n");
			}else out.append("NO"+"\n");
		} {
			str=br.readLine().split(" ");
			long max=0;
			for(int j=0;j<3;j++){
				hen[j]=Integer.parseInt(str[j]);
				if(max<hen[j]){	max=hen[j];	s=j;}
			}
			hen[s]=0;
			if(max*max == hen[0]*hen[0]+hen[1]*hen[1]+hen[2]*hen[2]){
				out.append("YES" + "\n");
			}else out.append("NO"+"\n");
		} str=br.readLine().split(" ") str br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " long max=0; max 0 for(int j=0;j<3;j++){
				hen[j]=Integer.parseInt(str[j]);
				if(max<hen[j]){	max=hen[j];	s=j;}
			} int j=0; int j=0; j 0 j<3 j 3 j++ j++ j {
				hen[j]=Integer.parseInt(str[j]);
				if(max<hen[j]){	max=hen[j];	s=j;}
			} {
				hen[j]=Integer.parseInt(str[j]);
				if(max<hen[j]){	max=hen[j];	s=j;}
			} hen[j]=Integer.parseInt(str[j]) hen[j] hen j Integer.parseInt(str[j]) Integer.parseInt Integer str[j] str j if(max<hen[j]){	max=hen[j];	s=j;} max<hen[j] max hen[j] hen j {	max=hen[j];	s=j;} max=hen[j] max hen[j] hen j s=j s j hen[s]=0 hen[s] hen s 0 if(max*max == hen[0]*hen[0]+hen[1]*hen[1]+hen[2]*hen[2]){
				out.append("YES" + "\n");
			}else out.append("NO"+"\n"); max*max == hen[0]*hen[0]+hen[1]*hen[1]+hen[2]*hen[2] max*max max max hen[0]*hen[0]+hen[1]*hen[1]+hen[2]*hen[2] hen[0]*hen[0]+hen[1]*hen[1]+hen[2]*hen[2] hen[0]*hen[0] hen[0] hen 0 hen[0] hen 0 hen[1]*hen[1] hen[1] hen 1 hen[1] hen 1 hen[2]*hen[2] hen[2] hen 2 hen[2] hen 2 {
				out.append("YES" + "\n");
			} out.append("YES" + "\n") out.append out "YES" + "\n" "YES" "\n" out.append("NO"+"\n") out.append out "NO"+"\n" "NO" "\n" out.delete(out.length()-1,out.length()) out.delete out out.length()-1 out.length() out.length out 1 out.length() out.length out System.out.println(out) System.out.println System.out System System.out out String[] args args public class Main {
	public static void main(String[] args)throws IOException {
		BufferedReader br=new BufferedReader (new InputStreamReader(System.in));
		int n,s=0;
		String[] str;
		long[] hen=new long[3];
		n=Integer.parseInt(br.readLine());
		StringBuilder out=new StringBuilder();
		for(int i=0;i<n;i++){
			str=br.readLine().split(" ");
			long max=0;
			for(int j=0;j<3;j++){
				hen[j]=Integer.parseInt(str[j]);
				if(max<hen[j]){	max=hen[j];	s=j;}
			}
			hen[s]=0;
			if(max*max == hen[0]*hen[0]+hen[1]*hen[1]+hen[2]*hen[2]){
				out.append("YES" + "\n");
			}else out.append("NO"+"\n");
		}
		out.delete(out.length()-1,out.length());
		System.out.println(out);
	}
} public class Main {
	public static void main(String[] args)throws IOException {
		BufferedReader br=new BufferedReader (new InputStreamReader(System.in));
		int n,s=0;
		String[] str;
		long[] hen=new long[3];
		n=Integer.parseInt(br.readLine());
		StringBuilder out=new StringBuilder();
		for(int i=0;i<n;i++){
			str=br.readLine().split(" ");
			long max=0;
			for(int j=0;j<3;j++){
				hen[j]=Integer.parseInt(str[j]);
				if(max<hen[j]){	max=hen[j];	s=j;}
			}
			hen[s]=0;
			if(max*max == hen[0]*hen[0]+hen[1]*hen[1]+hen[2]*hen[2]){
				out.append("YES" + "\n");
			}else out.append("NO"+"\n");
		}
		out.delete(out.length()-1,out.length());
		System.out.println(out);
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
	public static void main(String[] args)throws IOException {
		BufferedReader br=new BufferedReader (new InputStreamReader(System.in));
		int n,s=0;
		String[] str;
		long[] hen=new long[3];
		n=Integer.parseInt(br.readLine());
		StringBuilder out=new StringBuilder();
		for(int i=0;i<n;i++){
			str=br.readLine().split(" ");
			long max=0;
			for(int j=0;j<3;j++){
				hen[j]=Integer.parseInt(str[j]);
				if(max<hen[j]){	max=hen[j];	s=j;}
			}
			hen[s]=0;
			if(max*max == hen[0]*hen[0]+hen[1]*hen[1]+hen[2]*hen[2]){
				out.append("YES" + "\n");
			}else out.append("NO"+"\n");
		}
		out.delete(out.length()-1,out.length());
		System.out.println(out);
	}
}