import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner input=new Scanner(System.in);
		
		int circle=input.nextInt();
		for(int i=0;i<circle;i++){
			int a=input.nextInt();
			int b=input.nextInt();
			int c=input.nextInt();
			
			if(a*a+b*b==c*c || a*a+c*c==b*b || b*b+c*c==a*a)
				System.out.println("YES");
			else
				System.out.println("NO");
		}
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
		Scanner input=new Scanner(System.in);
		
		int circle=input.nextInt();
		for(int i=0;i<circle;i++){
			int a=input.nextInt();
			int b=input.nextInt();
			int c=input.nextInt();
			
			if(a*a+b*b==c*c || a*a+c*c==b*b || b*b+c*c==a*a)
				System.out.println("YES");
			else
				System.out.println("NO");
		}
	}
} Main public static void main(String[] args){
		Scanner input=new Scanner(System.in);
		
		int circle=input.nextInt();
		for(int i=0;i<circle;i++){
			int a=input.nextInt();
			int b=input.nextInt();
			int c=input.nextInt();
			
			if(a*a+b*b==c*c || a*a+c*c==b*b || b*b+c*c==a*a)
				System.out.println("YES");
			else
				System.out.println("NO");
		}
	} main {
		Scanner input=new Scanner(System.in);
		
		int circle=input.nextInt();
		for(int i=0;i<circle;i++){
			int a=input.nextInt();
			int b=input.nextInt();
			int c=input.nextInt();
			
			if(a*a+b*b==c*c || a*a+c*c==b*b || b*b+c*c==a*a)
				System.out.println("YES");
			else
				System.out.println("NO");
		}
	} Scanner input=new Scanner(System.in); input new Scanner(System.in) int circle=input.nextInt(); circle input.nextInt() input.nextInt input for(int i=0;i<circle;i++){
			int a=input.nextInt();
			int b=input.nextInt();
			int c=input.nextInt();
			
			if(a*a+b*b==c*c || a*a+c*c==b*b || b*b+c*c==a*a)
				System.out.println("YES");
			else
				System.out.println("NO");
		} int i=0; int i=0; i 0 i<circle i circle i++ i++ i {
			int a=input.nextInt();
			int b=input.nextInt();
			int c=input.nextInt();
			
			if(a*a+b*b==c*c || a*a+c*c==b*b || b*b+c*c==a*a)
				System.out.println("YES");
			else
				System.out.println("NO");
		} {
			int a=input.nextInt();
			int b=input.nextInt();
			int c=input.nextInt();
			
			if(a*a+b*b==c*c || a*a+c*c==b*b || b*b+c*c==a*a)
				System.out.println("YES");
			else
				System.out.println("NO");
		} int a=input.nextInt(); a input.nextInt() input.nextInt input int b=input.nextInt(); b input.nextInt() input.nextInt input int c=input.nextInt(); c input.nextInt() input.nextInt input if(a*a+b*b==c*c || a*a+c*c==b*b || b*b+c*c==a*a)
				System.out.println("YES");
			else
				System.out.println("NO"); 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.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){
		Scanner input=new Scanner(System.in);
		
		int circle=input.nextInt();
		for(int i=0;i<circle;i++){
			int a=input.nextInt();
			int b=input.nextInt();
			int c=input.nextInt();
			
			if(a*a+b*b==c*c || a*a+c*c==b*b || b*b+c*c==a*a)
				System.out.println("YES");
			else
				System.out.println("NO");
		}
	}
} public class Main {
	public static void main(String[] args){
		Scanner input=new Scanner(System.in);
		
		int circle=input.nextInt();
		for(int i=0;i<circle;i++){
			int a=input.nextInt();
			int b=input.nextInt();
			int c=input.nextInt();
			
			if(a*a+b*b==c*c || a*a+c*c==b*b || b*b+c*c==a*a)
				System.out.println("YES");
			else
				System.out.println("NO");
		}
	}
} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner input=new Scanner(System.in);
		
		int circle=input.nextInt();
		for(int i=0;i<circle;i++){
			int a=input.nextInt();
			int b=input.nextInt();
			int c=input.nextInt();
			
			if(a*a+b*b==c*c || a*a+c*c==b*b || b*b+c*c==a*a)
				System.out.println("YES");
			else
				System.out.println("NO");
		}
	}
}