
import java.io.*;

public class Main {

	//ツ　0003
	public static void main(String[] args) throws IOException {
		
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

		int n = Integer.parseInt(reader.readLine());
		
		for(int i = 0; i < n; i++) {
			
			String s = reader.readLine();
//			if (s == null)
//				break;
			
			String[] sp = s.split(" ");
			int a = Integer.parseInt(sp[0]);
			int b = Integer.parseInt(sp[1]);
			int c = Integer.parseInt(sp[2]);
			if (a*a+b*b==c*c || a*a+c*c==b*b || b*b+c*c==a*a) {
				System.out.printf("YES\n");
			}
			else {
				System.out.printf("NO\n");
			}
		}
		reader.close();
	}
} import java.io.*; io.* java public class Main {

	//ツ　0003
	public static void main(String[] args) throws IOException {
		
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

		int n = Integer.parseInt(reader.readLine());
		
		for(int i = 0; i < n; i++) {
			
			String s = reader.readLine();
//			if (s == null)
//				break;
			
			String[] sp = s.split(" ");
			int a = Integer.parseInt(sp[0]);
			int b = Integer.parseInt(sp[1]);
			int c = Integer.parseInt(sp[2]);
			if (a*a+b*b==c*c || a*a+c*c==b*b || b*b+c*c==a*a) {
				System.out.printf("YES\n");
			}
			else {
				System.out.printf("NO\n");
			}
		}
		reader.close();
	}
} Main //ツ　0003
	public static void main(String[] args) throws IOException {
		
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

		int n = Integer.parseInt(reader.readLine());
		
		for(int i = 0; i < n; i++) {
			
			String s = reader.readLine();
//			if (s == null)
//				break;
			
			String[] sp = s.split(" ");
			int a = Integer.parseInt(sp[0]);
			int b = Integer.parseInt(sp[1]);
			int c = Integer.parseInt(sp[2]);
			if (a*a+b*b==c*c || a*a+c*c==b*b || b*b+c*c==a*a) {
				System.out.printf("YES\n");
			}
			else {
				System.out.printf("NO\n");
			}
		}
		reader.close();
	} main {
		
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

		int n = Integer.parseInt(reader.readLine());
		
		for(int i = 0; i < n; i++) {
			
			String s = reader.readLine();
//			if (s == null)
//				break;
			
			String[] sp = s.split(" ");
			int a = Integer.parseInt(sp[0]);
			int b = Integer.parseInt(sp[1]);
			int c = Integer.parseInt(sp[2]);
			if (a*a+b*b==c*c || a*a+c*c==b*b || b*b+c*c==a*a) {
				System.out.printf("YES\n");
			}
			else {
				System.out.printf("NO\n");
			}
		}
		reader.close();
	} BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); reader new BufferedReader(new InputStreamReader(System.in)) int n = Integer.parseInt(reader.readLine()); n Integer.parseInt(reader.readLine()) Integer.parseInt Integer reader.readLine() reader.readLine reader for(int i = 0; i < n; i++) {
			
			String s = reader.readLine();
//			if (s == null)
//				break;
			
			String[] sp = s.split(" ");
			int a = Integer.parseInt(sp[0]);
			int b = Integer.parseInt(sp[1]);
			int c = Integer.parseInt(sp[2]);
			if (a*a+b*b==c*c || a*a+c*c==b*b || b*b+c*c==a*a) {
				System.out.printf("YES\n");
			}
			else {
				System.out.printf("NO\n");
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			
			String s = reader.readLine();
//			if (s == null)
//				break;
			
			String[] sp = s.split(" ");
			int a = Integer.parseInt(sp[0]);
			int b = Integer.parseInt(sp[1]);
			int c = Integer.parseInt(sp[2]);
			if (a*a+b*b==c*c || a*a+c*c==b*b || b*b+c*c==a*a) {
				System.out.printf("YES\n");
			}
			else {
				System.out.printf("NO\n");
			}
		} {
			
			String s = reader.readLine();
//			if (s == null)
//				break;
			
			String[] sp = s.split(" ");
			int a = Integer.parseInt(sp[0]);
			int b = Integer.parseInt(sp[1]);
			int c = Integer.parseInt(sp[2]);
			if (a*a+b*b==c*c || a*a+c*c==b*b || b*b+c*c==a*a) {
				System.out.printf("YES\n");
			}
			else {
				System.out.printf("NO\n");
			}
		} String s = reader.readLine(); s reader.readLine() reader.readLine reader String[] sp = s.split(" "); sp s.split(" ") s.split s " " int a = Integer.parseInt(sp[0]); a Integer.parseInt(sp[0]) Integer.parseInt Integer sp[0] sp 0 int b = Integer.parseInt(sp[1]); b Integer.parseInt(sp[1]) Integer.parseInt Integer sp[1] sp 1 int c = Integer.parseInt(sp[2]); c Integer.parseInt(sp[2]) Integer.parseInt Integer sp[2] sp 2 if (a*a+b*b==c*c || a*a+c*c==b*b || b*b+c*c==a*a) {
				System.out.printf("YES\n");
			}
			else {
				System.out.printf("NO\n");
			} a*a+b*b==c*c || a*a+c*c==b*b || b*b+c*c==a*a a*a+b*b==c*c || a*a+c*c==b*b || b*b+c*c==a*a a*a+b*b==c*c a*a+b*b a*a a a b*b b b c*c c c a*a+c*c==b*b a*a+c*c a*a a a c*c c c b*b b b b*b+c*c==a*a b*b+c*c b*b b b c*c c c a*a a a {
				System.out.printf("YES\n");
			} System.out.printf("YES\n") System.out.printf System.out System System.out "YES\n" {
				System.out.printf("NO\n");
			} System.out.printf("NO\n") System.out.printf System.out System System.out "NO\n" reader.close() reader.close reader String[] args args public class Main {

	//ツ　0003
	public static void main(String[] args) throws IOException {
		
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

		int n = Integer.parseInt(reader.readLine());
		
		for(int i = 0; i < n; i++) {
			
			String s = reader.readLine();
//			if (s == null)
//				break;
			
			String[] sp = s.split(" ");
			int a = Integer.parseInt(sp[0]);
			int b = Integer.parseInt(sp[1]);
			int c = Integer.parseInt(sp[2]);
			if (a*a+b*b==c*c || a*a+c*c==b*b || b*b+c*c==a*a) {
				System.out.printf("YES\n");
			}
			else {
				System.out.printf("NO\n");
			}
		}
		reader.close();
	}
} public class Main {

	//ツ　0003
	public static void main(String[] args) throws IOException {
		
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

		int n = Integer.parseInt(reader.readLine());
		
		for(int i = 0; i < n; i++) {
			
			String s = reader.readLine();
//			if (s == null)
//				break;
			
			String[] sp = s.split(" ");
			int a = Integer.parseInt(sp[0]);
			int b = Integer.parseInt(sp[1]);
			int c = Integer.parseInt(sp[2]);
			if (a*a+b*b==c*c || a*a+c*c==b*b || b*b+c*c==a*a) {
				System.out.printf("YES\n");
			}
			else {
				System.out.printf("NO\n");
			}
		}
		reader.close();
	}
} Main

import java.io.*;

public class Main {

	//ツ　0003
	public static void main(String[] args) throws IOException {
		
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

		int n = Integer.parseInt(reader.readLine());
		
		for(int i = 0; i < n; i++) {
			
			String s = reader.readLine();
//			if (s == null)
//				break;
			
			String[] sp = s.split(" ");
			int a = Integer.parseInt(sp[0]);
			int b = Integer.parseInt(sp[1]);
			int c = Integer.parseInt(sp[2]);
			if (a*a+b*b==c*c || a*a+c*c==b*b || b*b+c*c==a*a) {
				System.out.printf("YES\n");
			}
			else {
				System.out.printf("NO\n");
			}
		}
		reader.close();
	}
}