import java.io.*;

public class Main {
	public static void main(String[] args)throws IOException{
		//System.out.println("Hello world");
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br =new  BufferedReader(is);

		String c = br.readLine();
		int n1 = Integer.parseInt(c);
		int[] n = new int[3];

		for(int j = 0; j <n1; j++){
			String str = br.readLine();
			int space1 = str.indexOf(" ");
			int space2 = str.indexOf(" ", space1+1);
			String str1 = str.substring(0, space1);
			String str2 = str.substring(space1+1, space2);
			String str3 = str.substring(space2+1, str.length());
			n[0] = Integer.parseInt(str1);
			n[1] = Integer.parseInt(str2);
			n[2] = Integer.parseInt(str3);

			int[] max = new int[3];
			max[2] = n[0];
			for(int i = 0; i <3; i++){
				if(max[2] <= n[i]){
					max[2] = n[i];
					if(max[2] >= max[1]){
						int re = max[1];
						max[1] = max[2];
						max[2] = re;
						if(max[1] >= max[0]){
							int re2 = max[0];
							max[0] = max[1];
							max[1] = re2;
						}
					}
				}

			}
			if(max[0]*max[0] == max[1]*max[1] + max[2]*max[2])
				System.out.println("YES");
			else
				System.out.println("NO");

		}




	}

} import java.io.*; io.* java public class Main {
	public static void main(String[] args)throws IOException{
		//System.out.println("Hello world");
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br =new  BufferedReader(is);

		String c = br.readLine();
		int n1 = Integer.parseInt(c);
		int[] n = new int[3];

		for(int j = 0; j <n1; j++){
			String str = br.readLine();
			int space1 = str.indexOf(" ");
			int space2 = str.indexOf(" ", space1+1);
			String str1 = str.substring(0, space1);
			String str2 = str.substring(space1+1, space2);
			String str3 = str.substring(space2+1, str.length());
			n[0] = Integer.parseInt(str1);
			n[1] = Integer.parseInt(str2);
			n[2] = Integer.parseInt(str3);

			int[] max = new int[3];
			max[2] = n[0];
			for(int i = 0; i <3; i++){
				if(max[2] <= n[i]){
					max[2] = n[i];
					if(max[2] >= max[1]){
						int re = max[1];
						max[1] = max[2];
						max[2] = re;
						if(max[1] >= max[0]){
							int re2 = max[0];
							max[0] = max[1];
							max[1] = re2;
						}
					}
				}

			}
			if(max[0]*max[0] == max[1]*max[1] + max[2]*max[2])
				System.out.println("YES");
			else
				System.out.println("NO");

		}




	}

} Main public static void main(String[] args)throws IOException{
		//System.out.println("Hello world");
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br =new  BufferedReader(is);

		String c = br.readLine();
		int n1 = Integer.parseInt(c);
		int[] n = new int[3];

		for(int j = 0; j <n1; j++){
			String str = br.readLine();
			int space1 = str.indexOf(" ");
			int space2 = str.indexOf(" ", space1+1);
			String str1 = str.substring(0, space1);
			String str2 = str.substring(space1+1, space2);
			String str3 = str.substring(space2+1, str.length());
			n[0] = Integer.parseInt(str1);
			n[1] = Integer.parseInt(str2);
			n[2] = Integer.parseInt(str3);

			int[] max = new int[3];
			max[2] = n[0];
			for(int i = 0; i <3; i++){
				if(max[2] <= n[i]){
					max[2] = n[i];
					if(max[2] >= max[1]){
						int re = max[1];
						max[1] = max[2];
						max[2] = re;
						if(max[1] >= max[0]){
							int re2 = max[0];
							max[0] = max[1];
							max[1] = re2;
						}
					}
				}

			}
			if(max[0]*max[0] == max[1]*max[1] + max[2]*max[2])
				System.out.println("YES");
			else
				System.out.println("NO");

		}




	} main {
		//System.out.println("Hello world");
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br =new  BufferedReader(is);

		String c = br.readLine();
		int n1 = Integer.parseInt(c);
		int[] n = new int[3];

		for(int j = 0; j <n1; j++){
			String str = br.readLine();
			int space1 = str.indexOf(" ");
			int space2 = str.indexOf(" ", space1+1);
			String str1 = str.substring(0, space1);
			String str2 = str.substring(space1+1, space2);
			String str3 = str.substring(space2+1, str.length());
			n[0] = Integer.parseInt(str1);
			n[1] = Integer.parseInt(str2);
			n[2] = Integer.parseInt(str3);

			int[] max = new int[3];
			max[2] = n[0];
			for(int i = 0; i <3; i++){
				if(max[2] <= n[i]){
					max[2] = n[i];
					if(max[2] >= max[1]){
						int re = max[1];
						max[1] = max[2];
						max[2] = re;
						if(max[1] >= max[0]){
							int re2 = max[0];
							max[0] = max[1];
							max[1] = re2;
						}
					}
				}

			}
			if(max[0]*max[0] == max[1]*max[1] + max[2]*max[2])
				System.out.println("YES");
			else
				System.out.println("NO");

		}




	} InputStreamReader is = new InputStreamReader(System.in); is new InputStreamReader(System.in) BufferedReader br =new  BufferedReader(is); br new  BufferedReader(is) String c = br.readLine(); c br.readLine() br.readLine br int n1 = Integer.parseInt(c); n1 Integer.parseInt(c) Integer.parseInt Integer c int[] n = new int[3]; n new int[3] 3 for(int j = 0; j <n1; j++){
			String str = br.readLine();
			int space1 = str.indexOf(" ");
			int space2 = str.indexOf(" ", space1+1);
			String str1 = str.substring(0, space1);
			String str2 = str.substring(space1+1, space2);
			String str3 = str.substring(space2+1, str.length());
			n[0] = Integer.parseInt(str1);
			n[1] = Integer.parseInt(str2);
			n[2] = Integer.parseInt(str3);

			int[] max = new int[3];
			max[2] = n[0];
			for(int i = 0; i <3; i++){
				if(max[2] <= n[i]){
					max[2] = n[i];
					if(max[2] >= max[1]){
						int re = max[1];
						max[1] = max[2];
						max[2] = re;
						if(max[1] >= max[0]){
							int re2 = max[0];
							max[0] = max[1];
							max[1] = re2;
						}
					}
				}

			}
			if(max[0]*max[0] == max[1]*max[1] + max[2]*max[2])
				System.out.println("YES");
			else
				System.out.println("NO");

		} int j = 0; int j = 0; j 0 j <n1 j n1 j++ j++ j {
			String str = br.readLine();
			int space1 = str.indexOf(" ");
			int space2 = str.indexOf(" ", space1+1);
			String str1 = str.substring(0, space1);
			String str2 = str.substring(space1+1, space2);
			String str3 = str.substring(space2+1, str.length());
			n[0] = Integer.parseInt(str1);
			n[1] = Integer.parseInt(str2);
			n[2] = Integer.parseInt(str3);

			int[] max = new int[3];
			max[2] = n[0];
			for(int i = 0; i <3; i++){
				if(max[2] <= n[i]){
					max[2] = n[i];
					if(max[2] >= max[1]){
						int re = max[1];
						max[1] = max[2];
						max[2] = re;
						if(max[1] >= max[0]){
							int re2 = max[0];
							max[0] = max[1];
							max[1] = re2;
						}
					}
				}

			}
			if(max[0]*max[0] == max[1]*max[1] + max[2]*max[2])
				System.out.println("YES");
			else
				System.out.println("NO");

		} {
			String str = br.readLine();
			int space1 = str.indexOf(" ");
			int space2 = str.indexOf(" ", space1+1);
			String str1 = str.substring(0, space1);
			String str2 = str.substring(space1+1, space2);
			String str3 = str.substring(space2+1, str.length());
			n[0] = Integer.parseInt(str1);
			n[1] = Integer.parseInt(str2);
			n[2] = Integer.parseInt(str3);

			int[] max = new int[3];
			max[2] = n[0];
			for(int i = 0; i <3; i++){
				if(max[2] <= n[i]){
					max[2] = n[i];
					if(max[2] >= max[1]){
						int re = max[1];
						max[1] = max[2];
						max[2] = re;
						if(max[1] >= max[0]){
							int re2 = max[0];
							max[0] = max[1];
							max[1] = re2;
						}
					}
				}

			}
			if(max[0]*max[0] == max[1]*max[1] + max[2]*max[2])
				System.out.println("YES");
			else
				System.out.println("NO");

		} String str = br.readLine(); str br.readLine() br.readLine br int space1 = str.indexOf(" "); space1 str.indexOf(" ") str.indexOf str " " int space2 = str.indexOf(" ", space1+1); space2 str.indexOf(" ", space1+1) str.indexOf str " " space1+1 space1 1 String str1 = str.substring(0, space1); str1 str.substring(0, space1) str.substring str 0 space1 String str2 = str.substring(space1+1, space2); str2 str.substring(space1+1, space2) str.substring str space1+1 space1 1 space2 String str3 = str.substring(space2+1, str.length()); str3 str.substring(space2+1, str.length()) str.substring str space2+1 space2 1 str.length() str.length str n[0] = Integer.parseInt(str1) n[0] n 0 Integer.parseInt(str1) Integer.parseInt Integer str1 n[1] = Integer.parseInt(str2) n[1] n 1 Integer.parseInt(str2) Integer.parseInt Integer str2 n[2] = Integer.parseInt(str3) n[2] n 2 Integer.parseInt(str3) Integer.parseInt Integer str3 int[] max = new int[3]; max new int[3] 3 max[2] = n[0] max[2] max 2 n[0] n 0 for(int i = 0; i <3; i++){
				if(max[2] <= n[i]){
					max[2] = n[i];
					if(max[2] >= max[1]){
						int re = max[1];
						max[1] = max[2];
						max[2] = re;
						if(max[1] >= max[0]){
							int re2 = max[0];
							max[0] = max[1];
							max[1] = re2;
						}
					}
				}

			} int i = 0; int i = 0; i 0 i <3 i 3 i++ i++ i {
				if(max[2] <= n[i]){
					max[2] = n[i];
					if(max[2] >= max[1]){
						int re = max[1];
						max[1] = max[2];
						max[2] = re;
						if(max[1] >= max[0]){
							int re2 = max[0];
							max[0] = max[1];
							max[1] = re2;
						}
					}
				}

			} {
				if(max[2] <= n[i]){
					max[2] = n[i];
					if(max[2] >= max[1]){
						int re = max[1];
						max[1] = max[2];
						max[2] = re;
						if(max[1] >= max[0]){
							int re2 = max[0];
							max[0] = max[1];
							max[1] = re2;
						}
					}
				}

			} if(max[2] <= n[i]){
					max[2] = n[i];
					if(max[2] >= max[1]){
						int re = max[1];
						max[1] = max[2];
						max[2] = re;
						if(max[1] >= max[0]){
							int re2 = max[0];
							max[0] = max[1];
							max[1] = re2;
						}
					}
				} max[2] <= n[i] max[2] max 2 n[i] n i {
					max[2] = n[i];
					if(max[2] >= max[1]){
						int re = max[1];
						max[1] = max[2];
						max[2] = re;
						if(max[1] >= max[0]){
							int re2 = max[0];
							max[0] = max[1];
							max[1] = re2;
						}
					}
				} max[2] = n[i] max[2] max 2 n[i] n i if(max[2] >= max[1]){
						int re = max[1];
						max[1] = max[2];
						max[2] = re;
						if(max[1] >= max[0]){
							int re2 = max[0];
							max[0] = max[1];
							max[1] = re2;
						}
					} max[2] >= max[1] max[2] max 2 max[1] max 1 {
						int re = max[1];
						max[1] = max[2];
						max[2] = re;
						if(max[1] >= max[0]){
							int re2 = max[0];
							max[0] = max[1];
							max[1] = re2;
						}
					} int re = max[1]; re max[1] max 1 max[1] = max[2] max[1] max 1 max[2] max 2 max[2] = re max[2] max 2 re if(max[1] >= max[0]){
							int re2 = max[0];
							max[0] = max[1];
							max[1] = re2;
						} max[1] >= max[0] max[1] max 1 max[0] max 0 {
							int re2 = max[0];
							max[0] = max[1];
							max[1] = re2;
						} int re2 = max[0]; re2 max[0] max 0 max[0] = max[1] max[0] max 0 max[1] max 1 max[1] = re2 max[1] max 1 re2 if(max[0]*max[0] == max[1]*max[1] + max[2]*max[2])
				System.out.println("YES");
			else
				System.out.println("NO"); max[0]*max[0] == max[1]*max[1] + max[2]*max[2] max[0]*max[0] max[0] max 0 max[0] max 0 max[1]*max[1] + max[2]*max[2] max[1]*max[1] max[1] max 1 max[1] max 1 max[2]*max[2] max[2] max 2 max[2] max 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 public class Main {
	public static void main(String[] args)throws IOException{
		//System.out.println("Hello world");
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br =new  BufferedReader(is);

		String c = br.readLine();
		int n1 = Integer.parseInt(c);
		int[] n = new int[3];

		for(int j = 0; j <n1; j++){
			String str = br.readLine();
			int space1 = str.indexOf(" ");
			int space2 = str.indexOf(" ", space1+1);
			String str1 = str.substring(0, space1);
			String str2 = str.substring(space1+1, space2);
			String str3 = str.substring(space2+1, str.length());
			n[0] = Integer.parseInt(str1);
			n[1] = Integer.parseInt(str2);
			n[2] = Integer.parseInt(str3);

			int[] max = new int[3];
			max[2] = n[0];
			for(int i = 0; i <3; i++){
				if(max[2] <= n[i]){
					max[2] = n[i];
					if(max[2] >= max[1]){
						int re = max[1];
						max[1] = max[2];
						max[2] = re;
						if(max[1] >= max[0]){
							int re2 = max[0];
							max[0] = max[1];
							max[1] = re2;
						}
					}
				}

			}
			if(max[0]*max[0] == max[1]*max[1] + max[2]*max[2])
				System.out.println("YES");
			else
				System.out.println("NO");

		}




	}

} public class Main {
	public static void main(String[] args)throws IOException{
		//System.out.println("Hello world");
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br =new  BufferedReader(is);

		String c = br.readLine();
		int n1 = Integer.parseInt(c);
		int[] n = new int[3];

		for(int j = 0; j <n1; j++){
			String str = br.readLine();
			int space1 = str.indexOf(" ");
			int space2 = str.indexOf(" ", space1+1);
			String str1 = str.substring(0, space1);
			String str2 = str.substring(space1+1, space2);
			String str3 = str.substring(space2+1, str.length());
			n[0] = Integer.parseInt(str1);
			n[1] = Integer.parseInt(str2);
			n[2] = Integer.parseInt(str3);

			int[] max = new int[3];
			max[2] = n[0];
			for(int i = 0; i <3; i++){
				if(max[2] <= n[i]){
					max[2] = n[i];
					if(max[2] >= max[1]){
						int re = max[1];
						max[1] = max[2];
						max[2] = re;
						if(max[1] >= max[0]){
							int re2 = max[0];
							max[0] = max[1];
							max[1] = re2;
						}
					}
				}

			}
			if(max[0]*max[0] == max[1]*max[1] + max[2]*max[2])
				System.out.println("YES");
			else
				System.out.println("NO");

		}




	}

} Main
import java.io.*;

public class Main {
	public static void main(String[] args)throws IOException{
		//System.out.println("Hello world");
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br =new  BufferedReader(is);

		String c = br.readLine();
		int n1 = Integer.parseInt(c);
		int[] n = new int[3];

		for(int j = 0; j <n1; j++){
			String str = br.readLine();
			int space1 = str.indexOf(" ");
			int space2 = str.indexOf(" ", space1+1);
			String str1 = str.substring(0, space1);
			String str2 = str.substring(space1+1, space2);
			String str3 = str.substring(space2+1, str.length());
			n[0] = Integer.parseInt(str1);
			n[1] = Integer.parseInt(str2);
			n[2] = Integer.parseInt(str3);

			int[] max = new int[3];
			max[2] = n[0];
			for(int i = 0; i <3; i++){
				if(max[2] <= n[i]){
					max[2] = n[i];
					if(max[2] >= max[1]){
						int re = max[1];
						max[1] = max[2];
						max[2] = re;
						if(max[1] >= max[0]){
							int re2 = max[0];
							max[0] = max[1];
							max[1] = re2;
						}
					}
				}

			}
			if(max[0]*max[0] == max[1]*max[1] + max[2]*max[2])
				System.out.println("YES");
			else
				System.out.println("NO");

		}




	}

}