import java.util.Scanner;

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

		int[] x, y, z;
		int swap;
		
		int n = scan.nextInt();
		x = new int[n];
		y = new int[n];
		z = new int[n];
		
		for(int i = 0; i < n; i++){
			x[i] = scan.nextInt();
			y[i] = scan.nextInt();
			z[i] = scan.nextInt();
		}
		
		for(int i = 0; i < n; i++){
			if(x[i]*x[i] + y[i]*y[i] == z[i]*z[i] ||
			   x[i]*x[i] + z[i]*z[i] == y[i]*y[i] ||
			   z[i]*z[i] + y[i]*y[i] == x[i]*x[i]) System.out.println("YES");
			else System.out.println("NO");
		}
	}
} import java.util.Scanner; Scanner java.util class Main {
	public static void main(String[] a){
		Scanner scan = new Scanner(System.in);

		int[] x, y, z;
		int swap;
		
		int n = scan.nextInt();
		x = new int[n];
		y = new int[n];
		z = new int[n];
		
		for(int i = 0; i < n; i++){
			x[i] = scan.nextInt();
			y[i] = scan.nextInt();
			z[i] = scan.nextInt();
		}
		
		for(int i = 0; i < n; i++){
			if(x[i]*x[i] + y[i]*y[i] == z[i]*z[i] ||
			   x[i]*x[i] + z[i]*z[i] == y[i]*y[i] ||
			   z[i]*z[i] + y[i]*y[i] == x[i]*x[i]) System.out.println("YES");
			else System.out.println("NO");
		}
	}
} Main public static void main(String[] a){
		Scanner scan = new Scanner(System.in);

		int[] x, y, z;
		int swap;
		
		int n = scan.nextInt();
		x = new int[n];
		y = new int[n];
		z = new int[n];
		
		for(int i = 0; i < n; i++){
			x[i] = scan.nextInt();
			y[i] = scan.nextInt();
			z[i] = scan.nextInt();
		}
		
		for(int i = 0; i < n; i++){
			if(x[i]*x[i] + y[i]*y[i] == z[i]*z[i] ||
			   x[i]*x[i] + z[i]*z[i] == y[i]*y[i] ||
			   z[i]*z[i] + y[i]*y[i] == x[i]*x[i]) System.out.println("YES");
			else System.out.println("NO");
		}
	} main {
		Scanner scan = new Scanner(System.in);

		int[] x, y, z;
		int swap;
		
		int n = scan.nextInt();
		x = new int[n];
		y = new int[n];
		z = new int[n];
		
		for(int i = 0; i < n; i++){
			x[i] = scan.nextInt();
			y[i] = scan.nextInt();
			z[i] = scan.nextInt();
		}
		
		for(int i = 0; i < n; i++){
			if(x[i]*x[i] + y[i]*y[i] == z[i]*z[i] ||
			   x[i]*x[i] + z[i]*z[i] == y[i]*y[i] ||
			   z[i]*z[i] + y[i]*y[i] == x[i]*x[i]) System.out.println("YES");
			else System.out.println("NO");
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int[] x x y y z; z int swap; swap int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan x = new int[n] x new int[n] n y = new int[n] y new int[n] n z = new int[n] z new int[n] n for(int i = 0; i < n; i++){
			x[i] = scan.nextInt();
			y[i] = scan.nextInt();
			z[i] = scan.nextInt();
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			x[i] = scan.nextInt();
			y[i] = scan.nextInt();
			z[i] = scan.nextInt();
		} {
			x[i] = scan.nextInt();
			y[i] = scan.nextInt();
			z[i] = scan.nextInt();
		} x[i] = scan.nextInt() x[i] x i scan.nextInt() scan.nextInt scan y[i] = scan.nextInt() y[i] y i scan.nextInt() scan.nextInt scan z[i] = scan.nextInt() z[i] z i scan.nextInt() scan.nextInt scan for(int i = 0; i < n; i++){
			if(x[i]*x[i] + y[i]*y[i] == z[i]*z[i] ||
			   x[i]*x[i] + z[i]*z[i] == y[i]*y[i] ||
			   z[i]*z[i] + y[i]*y[i] == x[i]*x[i]) System.out.println("YES");
			else System.out.println("NO");
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			if(x[i]*x[i] + y[i]*y[i] == z[i]*z[i] ||
			   x[i]*x[i] + z[i]*z[i] == y[i]*y[i] ||
			   z[i]*z[i] + y[i]*y[i] == x[i]*x[i]) System.out.println("YES");
			else System.out.println("NO");
		} {
			if(x[i]*x[i] + y[i]*y[i] == z[i]*z[i] ||
			   x[i]*x[i] + z[i]*z[i] == y[i]*y[i] ||
			   z[i]*z[i] + y[i]*y[i] == x[i]*x[i]) System.out.println("YES");
			else System.out.println("NO");
		} if(x[i]*x[i] + y[i]*y[i] == z[i]*z[i] ||
			   x[i]*x[i] + z[i]*z[i] == y[i]*y[i] ||
			   z[i]*z[i] + y[i]*y[i] == x[i]*x[i]) System.out.println("YES");
			else System.out.println("NO"); x[i]*x[i] + y[i]*y[i] == z[i]*z[i] ||
			   x[i]*x[i] + z[i]*z[i] == y[i]*y[i] ||
			   z[i]*z[i] + y[i]*y[i] == x[i]*x[i] x[i]*x[i] + y[i]*y[i] == z[i]*z[i] ||
			   x[i]*x[i] + z[i]*z[i] == y[i]*y[i] ||
			   z[i]*z[i] + y[i]*y[i] == x[i]*x[i] x[i]*x[i] + y[i]*y[i] == z[i]*z[i] x[i]*x[i] + y[i]*y[i] x[i]*x[i] x[i] x i x[i] x i y[i]*y[i] y[i] y i y[i] y i z[i]*z[i] z[i] z i z[i] z i x[i]*x[i] + z[i]*z[i] == y[i]*y[i] x[i]*x[i] + z[i]*z[i] x[i]*x[i] x[i] x i x[i] x i z[i]*z[i] z[i] z i z[i] z i y[i]*y[i] y[i] y i y[i] y i z[i]*z[i] + y[i]*y[i] == x[i]*x[i] z[i]*z[i] + y[i]*y[i] z[i]*z[i] z[i] z i z[i] z i y[i]*y[i] y[i] y i y[i] y i x[i]*x[i] x[i] x i x[i] x i 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[] a a
import java.util.Scanner;

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

		int[] x, y, z;
		int swap;
		
		int n = scan.nextInt();
		x = new int[n];
		y = new int[n];
		z = new int[n];
		
		for(int i = 0; i < n; i++){
			x[i] = scan.nextInt();
			y[i] = scan.nextInt();
			z[i] = scan.nextInt();
		}
		
		for(int i = 0; i < n; i++){
			if(x[i]*x[i] + y[i]*y[i] == z[i]*z[i] ||
			   x[i]*x[i] + z[i]*z[i] == y[i]*y[i] ||
			   z[i]*z[i] + y[i]*y[i] == x[i]*x[i]) System.out.println("YES");
			else System.out.println("NO");
		}
	}
}