import java.util.Scanner;

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

	     String n = sc.nextLine();
	     int N = Integer.parseInt(n);

	     for (int i = 0; i < N; i++) {
	    	 
			String a = sc.nextLine();
            String[] array = a.split(" ");
            String b = array[0];
            String c = array[1];

            
			int x = Integer.parseInt(array[0]);			
			int y = Integer.parseInt(array[1]);
			int z = Integer.parseInt(array[2]);
			
			if(x*x + y*y == z*z){
				System.out.println("YES");
			}else if(x*x + z*z == y*y){
				System.out.println("YES");
			}else if(y*y + z*z == x*x){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
			
		}
		
		
	}

} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

	     String n = sc.nextLine();
	     int N = Integer.parseInt(n);

	     for (int i = 0; i < N; i++) {
	    	 
			String a = sc.nextLine();
            String[] array = a.split(" ");
            String b = array[0];
            String c = array[1];

            
			int x = Integer.parseInt(array[0]);			
			int y = Integer.parseInt(array[1]);
			int z = Integer.parseInt(array[2]);
			
			if(x*x + y*y == z*z){
				System.out.println("YES");
			}else if(x*x + z*z == y*y){
				System.out.println("YES");
			}else if(y*y + z*z == x*x){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
			
		}
		
		
	}

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

	     String n = sc.nextLine();
	     int N = Integer.parseInt(n);

	     for (int i = 0; i < N; i++) {
	    	 
			String a = sc.nextLine();
            String[] array = a.split(" ");
            String b = array[0];
            String c = array[1];

            
			int x = Integer.parseInt(array[0]);			
			int y = Integer.parseInt(array[1]);
			int z = Integer.parseInt(array[2]);
			
			if(x*x + y*y == z*z){
				System.out.println("YES");
			}else if(x*x + z*z == y*y){
				System.out.println("YES");
			}else if(y*y + z*z == x*x){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
			
		}
		
		
	} main {
		Scanner sc = new Scanner(System.in);

	     String n = sc.nextLine();
	     int N = Integer.parseInt(n);

	     for (int i = 0; i < N; i++) {
	    	 
			String a = sc.nextLine();
            String[] array = a.split(" ");
            String b = array[0];
            String c = array[1];

            
			int x = Integer.parseInt(array[0]);			
			int y = Integer.parseInt(array[1]);
			int z = Integer.parseInt(array[2]);
			
			if(x*x + y*y == z*z){
				System.out.println("YES");
			}else if(x*x + z*z == y*y){
				System.out.println("YES");
			}else if(y*y + z*z == x*x){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
			
		}
		
		
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String n = sc.nextLine(); n sc.nextLine() sc.nextLine sc int N = Integer.parseInt(n); N Integer.parseInt(n) Integer.parseInt Integer n for (int i = 0; i < N; i++) {
	    	 
			String a = sc.nextLine();
            String[] array = a.split(" ");
            String b = array[0];
            String c = array[1];

            
			int x = Integer.parseInt(array[0]);			
			int y = Integer.parseInt(array[1]);
			int z = Integer.parseInt(array[2]);
			
			if(x*x + y*y == z*z){
				System.out.println("YES");
			}else if(x*x + z*z == y*y){
				System.out.println("YES");
			}else if(y*y + z*z == x*x){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
			
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
	    	 
			String a = sc.nextLine();
            String[] array = a.split(" ");
            String b = array[0];
            String c = array[1];

            
			int x = Integer.parseInt(array[0]);			
			int y = Integer.parseInt(array[1]);
			int z = Integer.parseInt(array[2]);
			
			if(x*x + y*y == z*z){
				System.out.println("YES");
			}else if(x*x + z*z == y*y){
				System.out.println("YES");
			}else if(y*y + z*z == x*x){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
			
		} {
	    	 
			String a = sc.nextLine();
            String[] array = a.split(" ");
            String b = array[0];
            String c = array[1];

            
			int x = Integer.parseInt(array[0]);			
			int y = Integer.parseInt(array[1]);
			int z = Integer.parseInt(array[2]);
			
			if(x*x + y*y == z*z){
				System.out.println("YES");
			}else if(x*x + z*z == y*y){
				System.out.println("YES");
			}else if(y*y + z*z == x*x){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
			
		} String a = sc.nextLine(); a sc.nextLine() sc.nextLine sc String[] array = a.split(" "); array a.split(" ") a.split a " " String b = array[0]; b array[0] array 0 String c = array[1]; c array[1] array 1 int x = Integer.parseInt(array[0]); x Integer.parseInt(array[0]) Integer.parseInt Integer array[0] array 0 int y = Integer.parseInt(array[1]); y Integer.parseInt(array[1]) Integer.parseInt Integer array[1] array 1 int z = Integer.parseInt(array[2]); z Integer.parseInt(array[2]) Integer.parseInt Integer array[2] array 2 if(x*x + y*y == z*z){
				System.out.println("YES");
			}else if(x*x + z*z == y*y){
				System.out.println("YES");
			}else if(y*y + z*z == x*x){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			} x*x + y*y == z*z x*x + y*y x*x x x y*y y y z*z z z {
				System.out.println("YES");
			} System.out.println("YES") System.out.println System.out System System.out "YES" if(x*x + z*z == y*y){
				System.out.println("YES");
			}else if(y*y + z*z == x*x){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			} x*x + z*z == y*y x*x + z*z x*x x x z*z z z y*y y y {
				System.out.println("YES");
			} System.out.println("YES") System.out.println System.out System System.out "YES" if(y*y + z*z == x*x){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			} y*y + z*z == x*x y*y + z*z y*y y y z*z z z x*x x x {
				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 public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

	     String n = sc.nextLine();
	     int N = Integer.parseInt(n);

	     for (int i = 0; i < N; i++) {
	    	 
			String a = sc.nextLine();
            String[] array = a.split(" ");
            String b = array[0];
            String c = array[1];

            
			int x = Integer.parseInt(array[0]);			
			int y = Integer.parseInt(array[1]);
			int z = Integer.parseInt(array[2]);
			
			if(x*x + y*y == z*z){
				System.out.println("YES");
			}else if(x*x + z*z == y*y){
				System.out.println("YES");
			}else if(y*y + z*z == x*x){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
			
		}
		
		
	}

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

	     String n = sc.nextLine();
	     int N = Integer.parseInt(n);

	     for (int i = 0; i < N; i++) {
	    	 
			String a = sc.nextLine();
            String[] array = a.split(" ");
            String b = array[0];
            String c = array[1];

            
			int x = Integer.parseInt(array[0]);			
			int y = Integer.parseInt(array[1]);
			int z = Integer.parseInt(array[2]);
			
			if(x*x + y*y == z*z){
				System.out.println("YES");
			}else if(x*x + z*z == y*y){
				System.out.println("YES");
			}else if(y*y + z*z == x*x){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
			
		}
		
		
	}

} Main
import java.util.Scanner;

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

	     String n = sc.nextLine();
	     int N = Integer.parseInt(n);

	     for (int i = 0; i < N; i++) {
	    	 
			String a = sc.nextLine();
            String[] array = a.split(" ");
            String b = array[0];
            String c = array[1];

            
			int x = Integer.parseInt(array[0]);			
			int y = Integer.parseInt(array[1]);
			int z = Integer.parseInt(array[2]);
			
			if(x*x + y*y == z*z){
				System.out.println("YES");
			}else if(x*x + z*z == y*y){
				System.out.println("YES");
			}else if(y*y + z*z == x*x){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
			
		}
		
		
	}

}