import java.util.*;

class Main{
    public static void main(String[] args){
    	Scanner scn = new Scanner(System.in);
    	int n = scn.nextInt();
    	
    	for(int i=0; i<n; i++){
    		int a,b,c;
    		a = scn.nextInt();
    		b = scn.nextInt();
    		c = scn.nextInt();
    		
    		if(Math.abs(a*a-b*b) == c*c || a*a+b*b == c*c){
    			System.out.println("YES");
    		}else{
    			System.out.println("NO");
    		}
    	}
    }
} import java.util.*; util.* java class Main{
    public static void main(String[] args){
    	Scanner scn = new Scanner(System.in);
    	int n = scn.nextInt();
    	
    	for(int i=0; i<n; i++){
    		int a,b,c;
    		a = scn.nextInt();
    		b = scn.nextInt();
    		c = scn.nextInt();
    		
    		if(Math.abs(a*a-b*b) == c*c || a*a+b*b == c*c){
    			System.out.println("YES");
    		}else{
    			System.out.println("NO");
    		}
    	}
    }
} Main public static void main(String[] args){
    	Scanner scn = new Scanner(System.in);
    	int n = scn.nextInt();
    	
    	for(int i=0; i<n; i++){
    		int a,b,c;
    		a = scn.nextInt();
    		b = scn.nextInt();
    		c = scn.nextInt();
    		
    		if(Math.abs(a*a-b*b) == c*c || a*a+b*b == c*c){
    			System.out.println("YES");
    		}else{
    			System.out.println("NO");
    		}
    	}
    } main {
    	Scanner scn = new Scanner(System.in);
    	int n = scn.nextInt();
    	
    	for(int i=0; i<n; i++){
    		int a,b,c;
    		a = scn.nextInt();
    		b = scn.nextInt();
    		c = scn.nextInt();
    		
    		if(Math.abs(a*a-b*b) == c*c || a*a+b*b == c*c){
    			System.out.println("YES");
    		}else{
    			System.out.println("NO");
    		}
    	}
    } Scanner scn = new Scanner(System.in); scn new Scanner(System.in) int n = scn.nextInt(); n scn.nextInt() scn.nextInt scn for(int i=0; i<n; i++){
    		int a,b,c;
    		a = scn.nextInt();
    		b = scn.nextInt();
    		c = scn.nextInt();
    		
    		if(Math.abs(a*a-b*b) == c*c || a*a+b*b == c*c){
    			System.out.println("YES");
    		}else{
    			System.out.println("NO");
    		}
    	} int i=0; int i=0; i 0 i<n i n i++ i++ i {
    		int a,b,c;
    		a = scn.nextInt();
    		b = scn.nextInt();
    		c = scn.nextInt();
    		
    		if(Math.abs(a*a-b*b) == c*c || a*a+b*b == c*c){
    			System.out.println("YES");
    		}else{
    			System.out.println("NO");
    		}
    	} {
    		int a,b,c;
    		a = scn.nextInt();
    		b = scn.nextInt();
    		c = scn.nextInt();
    		
    		if(Math.abs(a*a-b*b) == c*c || a*a+b*b == c*c){
    			System.out.println("YES");
    		}else{
    			System.out.println("NO");
    		}
    	} int a a b b c; c a = scn.nextInt() a scn.nextInt() scn.nextInt scn b = scn.nextInt() b scn.nextInt() scn.nextInt scn c = scn.nextInt() c scn.nextInt() scn.nextInt scn if(Math.abs(a*a-b*b) == c*c || a*a+b*b == c*c){
    			System.out.println("YES");
    		}else{
    			System.out.println("NO");
    		} Math.abs(a*a-b*b) == c*c || a*a+b*b == c*c Math.abs(a*a-b*b) == c*c Math.abs(a*a-b*b) Math.abs Math a*a-b*b a*a a a b*b b b c*c c c a*a+b*b == c*c a*a+b*b a*a a a b*b b b c*c c c {
    			System.out.println("YES");
    		} System.out.println("YES") System.out.println System.out System System.out "YES" {
    			System.out.println("NO");
    		} System.out.println("NO") System.out.println System.out System System.out "NO" String[] args args
import java.util.*;

class Main{
    public static void main(String[] args){
    	Scanner scn = new Scanner(System.in);
    	int n = scn.nextInt();
    	
    	for(int i=0; i<n; i++){
    		int a,b,c;
    		a = scn.nextInt();
    		b = scn.nextInt();
    		c = scn.nextInt();
    		
    		if(Math.abs(a*a-b*b) == c*c || a*a+b*b == c*c){
    			System.out.println("YES");
    		}else{
    			System.out.println("NO");
    		}
    	}
    }
}