import java.util.Scanner;

public class Main {
	public static void main(String a[]){
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		
		for(int i=0;i<N;i++){
			int b = sc.nextInt();
			int c = sc.nextInt();
			int d = sc.nextInt();
			System.out.println(isRightTriangle(b,c,d));
		}
		sc.close();
	}
	
	public static String isRightTriangle(int a, int b ,int c){
		if(a>b){
			int k = a;
			a = b;
			b = k;
		}
		if(b>c){
			int k = b;
			b = c;
			c= k;
		}
		
		if(c*c == a*a+b*b)
			return "YES";
		else
			return "NO";
	}

} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String a[]){
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		
		for(int i=0;i<N;i++){
			int b = sc.nextInt();
			int c = sc.nextInt();
			int d = sc.nextInt();
			System.out.println(isRightTriangle(b,c,d));
		}
		sc.close();
	}
	
	public static String isRightTriangle(int a, int b ,int c){
		if(a>b){
			int k = a;
			a = b;
			b = k;
		}
		if(b>c){
			int k = b;
			b = c;
			c= k;
		}
		
		if(c*c == a*a+b*b)
			return "YES";
		else
			return "NO";
	}

} Main public static void main(String a[]){
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		
		for(int i=0;i<N;i++){
			int b = sc.nextInt();
			int c = sc.nextInt();
			int d = sc.nextInt();
			System.out.println(isRightTriangle(b,c,d));
		}
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		
		for(int i=0;i<N;i++){
			int b = sc.nextInt();
			int c = sc.nextInt();
			int d = sc.nextInt();
			System.out.println(isRightTriangle(b,c,d));
		}
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc for(int i=0;i<N;i++){
			int b = sc.nextInt();
			int c = sc.nextInt();
			int d = sc.nextInt();
			System.out.println(isRightTriangle(b,c,d));
		} int i=0; int i=0; i 0 i<N i N i++ i++ i {
			int b = sc.nextInt();
			int c = sc.nextInt();
			int d = sc.nextInt();
			System.out.println(isRightTriangle(b,c,d));
		} {
			int b = sc.nextInt();
			int c = sc.nextInt();
			int d = sc.nextInt();
			System.out.println(isRightTriangle(b,c,d));
		} int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc int c = sc.nextInt(); c sc.nextInt() sc.nextInt sc int d = sc.nextInt(); d sc.nextInt() sc.nextInt sc System.out.println(isRightTriangle(b,c,d)) System.out.println System.out System System.out isRightTriangle(b,c,d) isRightTriangle b c d sc.close() sc.close sc String a[] a public static String isRightTriangle(int a, int b ,int c){
		if(a>b){
			int k = a;
			a = b;
			b = k;
		}
		if(b>c){
			int k = b;
			b = c;
			c= k;
		}
		
		if(c*c == a*a+b*b)
			return "YES";
		else
			return "NO";
	} isRightTriangle {
		if(a>b){
			int k = a;
			a = b;
			b = k;
		}
		if(b>c){
			int k = b;
			b = c;
			c= k;
		}
		
		if(c*c == a*a+b*b)
			return "YES";
		else
			return "NO";
	} if(a>b){
			int k = a;
			a = b;
			b = k;
		} a>b a b {
			int k = a;
			a = b;
			b = k;
		} int k = a; k a a = b a b b = k b k if(b>c){
			int k = b;
			b = c;
			c= k;
		} b>c b c {
			int k = b;
			b = c;
			c= k;
		} int k = b; k b b = c b c c= k c k if(c*c == a*a+b*b)
			return "YES";
		else
			return "NO"; c*c == a*a+b*b c*c c c a*a+b*b a*a a a b*b b b return "YES"; "YES" return "NO"; "NO" int a a int b b int c c public class Main {
	public static void main(String a[]){
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		
		for(int i=0;i<N;i++){
			int b = sc.nextInt();
			int c = sc.nextInt();
			int d = sc.nextInt();
			System.out.println(isRightTriangle(b,c,d));
		}
		sc.close();
	}
	
	public static String isRightTriangle(int a, int b ,int c){
		if(a>b){
			int k = a;
			a = b;
			b = k;
		}
		if(b>c){
			int k = b;
			b = c;
			c= k;
		}
		
		if(c*c == a*a+b*b)
			return "YES";
		else
			return "NO";
	}

} public class Main {
	public static void main(String a[]){
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		
		for(int i=0;i<N;i++){
			int b = sc.nextInt();
			int c = sc.nextInt();
			int d = sc.nextInt();
			System.out.println(isRightTriangle(b,c,d));
		}
		sc.close();
	}
	
	public static String isRightTriangle(int a, int b ,int c){
		if(a>b){
			int k = a;
			a = b;
			b = k;
		}
		if(b>c){
			int k = b;
			b = c;
			c= k;
		}
		
		if(c*c == a*a+b*b)
			return "YES";
		else
			return "NO";
	}

} Main
import java.util.Scanner;

public class Main {
	public static void main(String a[]){
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		
		for(int i=0;i<N;i++){
			int b = sc.nextInt();
			int c = sc.nextInt();
			int d = sc.nextInt();
			System.out.println(isRightTriangle(b,c,d));
		}
		sc.close();
	}
	
	public static String isRightTriangle(int a, int b ,int c){
		if(a>b){
			int k = a;
			a = b;
			b = k;
		}
		if(b>c){
			int k = b;
			b = c;
			c= k;
		}
		
		if(c*c == a*a+b*b)
			return "YES";
		else
			return "NO";
	}

}
