import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int line = scan.nextInt();
		int i = 1;
		while (i <= line) {
			int a = scan.nextInt();
			int b = scan.nextInt();
			int c = scan.nextInt();
			if (a * a + b * b == c * c || b * b + c * c == a * a || a * a + c * c == b * b) {
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
			i++;
		}
	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int line = scan.nextInt();
		int i = 1;
		while (i <= line) {
			int a = scan.nextInt();
			int b = scan.nextInt();
			int c = scan.nextInt();
			if (a * a + b * b == c * c || b * b + c * c == a * a || a * a + c * c == b * b) {
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
			i++;
		}
	}

} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int line = scan.nextInt();
		int i = 1;
		while (i <= line) {
			int a = scan.nextInt();
			int b = scan.nextInt();
			int c = scan.nextInt();
			if (a * a + b * b == c * c || b * b + c * c == a * a || a * a + c * c == b * b) {
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
			i++;
		}
	} main {
		Scanner scan = new Scanner(System.in);
		int line = scan.nextInt();
		int i = 1;
		while (i <= line) {
			int a = scan.nextInt();
			int b = scan.nextInt();
			int c = scan.nextInt();
			if (a * a + b * b == c * c || b * b + c * c == a * a || a * a + c * c == b * b) {
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
			i++;
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int line = scan.nextInt(); line scan.nextInt() scan.nextInt scan int i = 1; i 1 while (i <= line) {
			int a = scan.nextInt();
			int b = scan.nextInt();
			int c = scan.nextInt();
			if (a * a + b * b == c * c || b * b + c * c == a * a || a * a + c * c == b * b) {
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
			i++;
		} i <= line i line {
			int a = scan.nextInt();
			int b = scan.nextInt();
			int c = scan.nextInt();
			if (a * a + b * b == c * c || b * b + c * c == a * a || a * a + c * c == b * b) {
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
			i++;
		} int a = scan.nextInt(); a scan.nextInt() scan.nextInt scan int b = scan.nextInt(); b scan.nextInt() scan.nextInt scan int c = scan.nextInt(); c scan.nextInt() scan.nextInt scan if (a * a + b * b == c * c || b * b + c * c == a * a || a * a + c * c == b * b) {
				System.out.println("YES");
			}else{
				System.out.println("NO");
			} a * a + b * b == c * c || b * b + c * c == a * a || a * a + c * c == b * b a * a + b * b == c * c || b * b + c * c == a * a || a * a + c * c == b * b a * a + b * b == c * c a * a + b * b a * a a a b * b b b c * c c c b * b + c * c == a * a b * b + c * c b * b b b c * c c c a * a a a a * a + c * c == b * b a * a + c * c a * a a a c * c c c b * b b b {
				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" i++ i String[] args args public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int line = scan.nextInt();
		int i = 1;
		while (i <= line) {
			int a = scan.nextInt();
			int b = scan.nextInt();
			int c = scan.nextInt();
			if (a * a + b * b == c * c || b * b + c * c == a * a || a * a + c * c == b * b) {
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
			i++;
		}
	}

} public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int line = scan.nextInt();
		int i = 1;
		while (i <= line) {
			int a = scan.nextInt();
			int b = scan.nextInt();
			int c = scan.nextInt();
			if (a * a + b * b == c * c || b * b + c * c == a * a || a * a + c * c == b * b) {
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
			i++;
		}
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int line = scan.nextInt();
		int i = 1;
		while (i <= line) {
			int a = scan.nextInt();
			int b = scan.nextInt();
			int c = scan.nextInt();
			if (a * a + b * b == c * c || b * b + c * c == a * a || a * a + c * c == b * b) {
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
			i++;
		}
	}

}