import java.util.Scanner;

class Main {

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

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

class Main {

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