import java.util.Scanner;


public class Main{
	
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int dataset = sc.nextInt();

		int a, b, c;
		for(int i = 0; i < dataset; i++) {
			a = sc.nextInt();
			b = sc.nextInt();
			c = sc.nextInt();
			
			if(judgeTriangle(a, b, c)) System.out.println("YES");
			else System.out.println("NO");
		}
		sc.close();
	}
	
	static boolean judgeTriangle(int a, int b, int c) {
		int da = a * a;
		int db = b * b;
		int dc = c * c;
		if(da + db == dc) return true;
		else if(db + dc == da) return true;
		else if(dc + da == db) return true;
		else return false;
	}
} import java.util.Scanner; Scanner java.util public class Main{
	
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int dataset = sc.nextInt();

		int a, b, c;
		for(int i = 0; i < dataset; i++) {
			a = sc.nextInt();
			b = sc.nextInt();
			c = sc.nextInt();
			
			if(judgeTriangle(a, b, c)) System.out.println("YES");
			else System.out.println("NO");
		}
		sc.close();
	}
	
	static boolean judgeTriangle(int a, int b, int c) {
		int da = a * a;
		int db = b * b;
		int dc = c * c;
		if(da + db == dc) return true;
		else if(db + dc == da) return true;
		else if(dc + da == db) return true;
		else return false;
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int dataset = sc.nextInt();

		int a, b, c;
		for(int i = 0; i < dataset; i++) {
			a = sc.nextInt();
			b = sc.nextInt();
			c = sc.nextInt();
			
			if(judgeTriangle(a, b, c)) System.out.println("YES");
			else System.out.println("NO");
		}
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		int dataset = sc.nextInt();

		int a, b, c;
		for(int i = 0; i < dataset; i++) {
			a = sc.nextInt();
			b = sc.nextInt();
			c = sc.nextInt();
			
			if(judgeTriangle(a, b, c)) System.out.println("YES");
			else System.out.println("NO");
		}
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int dataset = sc.nextInt(); dataset sc.nextInt() sc.nextInt sc int a a b b c; c for(int i = 0; i < dataset; i++) {
			a = sc.nextInt();
			b = sc.nextInt();
			c = sc.nextInt();
			
			if(judgeTriangle(a, b, c)) System.out.println("YES");
			else System.out.println("NO");
		} int i = 0; int i = 0; i 0 i < dataset i dataset i++ i++ i {
			a = sc.nextInt();
			b = sc.nextInt();
			c = sc.nextInt();
			
			if(judgeTriangle(a, b, c)) System.out.println("YES");
			else System.out.println("NO");
		} {
			a = sc.nextInt();
			b = sc.nextInt();
			c = sc.nextInt();
			
			if(judgeTriangle(a, b, c)) System.out.println("YES");
			else System.out.println("NO");
		} a = sc.nextInt() a sc.nextInt() sc.nextInt sc b = sc.nextInt() b sc.nextInt() sc.nextInt sc c = sc.nextInt() c sc.nextInt() sc.nextInt sc if(judgeTriangle(a, b, c)) System.out.println("YES");
			else System.out.println("NO"); judgeTriangle(a, b, c) judgeTriangle a b c 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" sc.close() sc.close sc String[] args args static boolean judgeTriangle(int a, int b, int c) {
		int da = a * a;
		int db = b * b;
		int dc = c * c;
		if(da + db == dc) return true;
		else if(db + dc == da) return true;
		else if(dc + da == db) return true;
		else return false;
	} judgeTriangle {
		int da = a * a;
		int db = b * b;
		int dc = c * c;
		if(da + db == dc) return true;
		else if(db + dc == da) return true;
		else if(dc + da == db) return true;
		else return false;
	} int da = a * a; da a * a a a int db = b * b; db b * b b b int dc = c * c; dc c * c c c if(da + db == dc) return true;
		else if(db + dc == da) return true;
		else if(dc + da == db) return true;
		else return false; da + db == dc da + db da db dc return true; true if(db + dc == da) return true;
		else if(dc + da == db) return true;
		else return false; db + dc == da db + dc db dc da return true; true if(dc + da == db) return true;
		else return false; dc + da == db dc + da dc da db return true; true return false; false int a a int b b int c c public class Main{
	
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int dataset = sc.nextInt();

		int a, b, c;
		for(int i = 0; i < dataset; i++) {
			a = sc.nextInt();
			b = sc.nextInt();
			c = sc.nextInt();
			
			if(judgeTriangle(a, b, c)) System.out.println("YES");
			else System.out.println("NO");
		}
		sc.close();
	}
	
	static boolean judgeTriangle(int a, int b, int c) {
		int da = a * a;
		int db = b * b;
		int dc = c * c;
		if(da + db == dc) return true;
		else if(db + dc == da) return true;
		else if(dc + da == db) return true;
		else return false;
	}
} public class Main{
	
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int dataset = sc.nextInt();

		int a, b, c;
		for(int i = 0; i < dataset; i++) {
			a = sc.nextInt();
			b = sc.nextInt();
			c = sc.nextInt();
			
			if(judgeTriangle(a, b, c)) System.out.println("YES");
			else System.out.println("NO");
		}
		sc.close();
	}
	
	static boolean judgeTriangle(int a, int b, int c) {
		int da = a * a;
		int db = b * b;
		int dc = c * c;
		if(da + db == dc) return true;
		else if(db + dc == da) return true;
		else if(dc + da == db) return true;
		else return false;
	}
} Main
import java.util.Scanner;


public class Main{
	
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int dataset = sc.nextInt();

		int a, b, c;
		for(int i = 0; i < dataset; i++) {
			a = sc.nextInt();
			b = sc.nextInt();
			c = sc.nextInt();
			
			if(judgeTriangle(a, b, c)) System.out.println("YES");
			else System.out.println("NO");
		}
		sc.close();
	}
	
	static boolean judgeTriangle(int a, int b, int c) {
		int da = a * a;
		int db = b * b;
		int dc = c * c;
		if(da + db == dc) return true;
		else if(db + dc == da) return true;
		else if(dc + da == db) return true;
		else return false;
	}
}