import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int a = 0;
		int b = 0;
		int c = 0;
		int n = scanner.nextInt();

		for(int i = 0; i < n; i++){
			a = scanner.nextInt();
			b = scanner.nextInt();
			c = scanner.nextInt();

			if(c *  c == a * a + b * b || b *  b == a * a + c * c || a *  a == b * b + c * c){
				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 scanner = new Scanner(System.in);
		int a = 0;
		int b = 0;
		int c = 0;
		int n = scanner.nextInt();

		for(int i = 0; i < n; i++){
			a = scanner.nextInt();
			b = scanner.nextInt();
			c = scanner.nextInt();

			if(c *  c == a * a + b * b || b *  b == a * a + 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 scanner = new Scanner(System.in);
		int a = 0;
		int b = 0;
		int c = 0;
		int n = scanner.nextInt();

		for(int i = 0; i < n; i++){
			a = scanner.nextInt();
			b = scanner.nextInt();
			c = scanner.nextInt();

			if(c *  c == a * a + b * b || b *  b == a * a + c * c || a *  a == b * b + c * c){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		}
	} main {
		Scanner scanner = new Scanner(System.in);
		int a = 0;
		int b = 0;
		int c = 0;
		int n = scanner.nextInt();

		for(int i = 0; i < n; i++){
			a = scanner.nextInt();
			b = scanner.nextInt();
			c = scanner.nextInt();

			if(c *  c == a * a + b * b || b *  b == a * a + c * c || a *  a == b * b + c * c){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		}
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int a = 0; a 0 int b = 0; b 0 int c = 0; c 0 int n = scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner for(int i = 0; i < n; i++){
			a = scanner.nextInt();
			b = scanner.nextInt();
			c = scanner.nextInt();

			if(c *  c == a * a + b * b || b *  b == a * a + 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 {
			a = scanner.nextInt();
			b = scanner.nextInt();
			c = scanner.nextInt();

			if(c *  c == a * a + b * b || b *  b == a * a + c * c || a *  a == b * b + c * c){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		} {
			a = scanner.nextInt();
			b = scanner.nextInt();
			c = scanner.nextInt();

			if(c *  c == a * a + b * b || b *  b == a * a + c * c || a *  a == b * b + c * c){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		} a = scanner.nextInt() a scanner.nextInt() scanner.nextInt scanner b = scanner.nextInt() b scanner.nextInt() scanner.nextInt scanner c = scanner.nextInt() c scanner.nextInt() scanner.nextInt scanner if(c *  c == a * a + b * b || b *  b == a * a + c * c || a *  a == b * b + c * c){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			} c *  c == a * a + b * b || b *  b == a * a + c * c || a *  a == b * b + c * c c *  c == a * a + b * b || b *  b == a * a + c * c || a *  a == b * b + c * c c *  c == a * a + b * b c *  c c c a * a + b * b a * a a a b * b b b b *  b == a * a + c * c b *  b b b a * a + c * c a * a a a c * c c c a *  a == b * b + c * c a *  a a a b * b + c * c 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 public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int a = 0;
		int b = 0;
		int c = 0;
		int n = scanner.nextInt();

		for(int i = 0; i < n; i++){
			a = scanner.nextInt();
			b = scanner.nextInt();
			c = scanner.nextInt();

			if(c *  c == a * a + b * b || b *  b == a * a + c * c || a *  a == b * b + c * c){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		}
	}
} public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int a = 0;
		int b = 0;
		int c = 0;
		int n = scanner.nextInt();

		for(int i = 0; i < n; i++){
			a = scanner.nextInt();
			b = scanner.nextInt();
			c = scanner.nextInt();

			if(c *  c == a * a + b * b || b *  b == a * a + c * c || a *  a == b * b + c * c){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		}
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int a = 0;
		int b = 0;
		int c = 0;
		int n = scanner.nextInt();

		for(int i = 0; i < n; i++){
			a = scanner.nextInt();
			b = scanner.nextInt();
			c = scanner.nextInt();

			if(c *  c == a * a + b * b || b *  b == a * a + c * c || a *  a == b * b + c * c){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		}
	}
}