import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		int n1;
		int n2;
		int n3;
		int date;

		Scanner scan = new Scanner(System.in);

		date = scan.nextInt();

		for(int i = 0 ; i < date ;i++){
			n1 = scan.nextInt();
			n2 = scan.nextInt();
			n3 = scan.nextInt();

			if(n3 * n3 == n2*n2+n1*n1){
				System.out.println("YES");

			}else if(n2 * n2 == n3 * n3 + n1 * n1){
				System.out.println("YES");

			}else if(n1 * n1 == n3 * n3 + n2 * n2){
				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) {
		int n1;
		int n2;
		int n3;
		int date;

		Scanner scan = new Scanner(System.in);

		date = scan.nextInt();

		for(int i = 0 ; i < date ;i++){
			n1 = scan.nextInt();
			n2 = scan.nextInt();
			n3 = scan.nextInt();

			if(n3 * n3 == n2*n2+n1*n1){
				System.out.println("YES");

			}else if(n2 * n2 == n3 * n3 + n1 * n1){
				System.out.println("YES");

			}else if(n1 * n1 == n3 * n3 + n2 * n2){
				System.out.println("YES");

			}else{
				System.out.println("NO");
			}
		}

	}

} Main public static void main(String[] args) {
		int n1;
		int n2;
		int n3;
		int date;

		Scanner scan = new Scanner(System.in);

		date = scan.nextInt();

		for(int i = 0 ; i < date ;i++){
			n1 = scan.nextInt();
			n2 = scan.nextInt();
			n3 = scan.nextInt();

			if(n3 * n3 == n2*n2+n1*n1){
				System.out.println("YES");

			}else if(n2 * n2 == n3 * n3 + n1 * n1){
				System.out.println("YES");

			}else if(n1 * n1 == n3 * n3 + n2 * n2){
				System.out.println("YES");

			}else{
				System.out.println("NO");
			}
		}

	} main {
		int n1;
		int n2;
		int n3;
		int date;

		Scanner scan = new Scanner(System.in);

		date = scan.nextInt();

		for(int i = 0 ; i < date ;i++){
			n1 = scan.nextInt();
			n2 = scan.nextInt();
			n3 = scan.nextInt();

			if(n3 * n3 == n2*n2+n1*n1){
				System.out.println("YES");

			}else if(n2 * n2 == n3 * n3 + n1 * n1){
				System.out.println("YES");

			}else if(n1 * n1 == n3 * n3 + n2 * n2){
				System.out.println("YES");

			}else{
				System.out.println("NO");
			}
		}

	} int n1; n1 int n2; n2 int n3; n3 int date; date Scanner scan = new Scanner(System.in); scan new Scanner(System.in) date = scan.nextInt() date scan.nextInt() scan.nextInt scan for(int i = 0 ; i < date ;i++){
			n1 = scan.nextInt();
			n2 = scan.nextInt();
			n3 = scan.nextInt();

			if(n3 * n3 == n2*n2+n1*n1){
				System.out.println("YES");

			}else if(n2 * n2 == n3 * n3 + n1 * n1){
				System.out.println("YES");

			}else if(n1 * n1 == n3 * n3 + n2 * n2){
				System.out.println("YES");

			}else{
				System.out.println("NO");
			}
		} int i = 0 ; int i = 0 ; i 0 i < date i date i++ i++ i {
			n1 = scan.nextInt();
			n2 = scan.nextInt();
			n3 = scan.nextInt();

			if(n3 * n3 == n2*n2+n1*n1){
				System.out.println("YES");

			}else if(n2 * n2 == n3 * n3 + n1 * n1){
				System.out.println("YES");

			}else if(n1 * n1 == n3 * n3 + n2 * n2){
				System.out.println("YES");

			}else{
				System.out.println("NO");
			}
		} {
			n1 = scan.nextInt();
			n2 = scan.nextInt();
			n3 = scan.nextInt();

			if(n3 * n3 == n2*n2+n1*n1){
				System.out.println("YES");

			}else if(n2 * n2 == n3 * n3 + n1 * n1){
				System.out.println("YES");

			}else if(n1 * n1 == n3 * n3 + n2 * n2){
				System.out.println("YES");

			}else{
				System.out.println("NO");
			}
		} n1 = scan.nextInt() n1 scan.nextInt() scan.nextInt scan n2 = scan.nextInt() n2 scan.nextInt() scan.nextInt scan n3 = scan.nextInt() n3 scan.nextInt() scan.nextInt scan if(n3 * n3 == n2*n2+n1*n1){
				System.out.println("YES");

			}else if(n2 * n2 == n3 * n3 + n1 * n1){
				System.out.println("YES");

			}else if(n1 * n1 == n3 * n3 + n2 * n2){
				System.out.println("YES");

			}else{
				System.out.println("NO");
			} n3 * n3 == n2*n2+n1*n1 n3 * n3 n3 n3 n2*n2+n1*n1 n2*n2 n2 n2 n1*n1 n1 n1 {
				System.out.println("YES");

			} System.out.println("YES") System.out.println System.out System System.out "YES" if(n2 * n2 == n3 * n3 + n1 * n1){
				System.out.println("YES");

			}else if(n1 * n1 == n3 * n3 + n2 * n2){
				System.out.println("YES");

			}else{
				System.out.println("NO");
			} n2 * n2 == n3 * n3 + n1 * n1 n2 * n2 n2 n2 n3 * n3 + n1 * n1 n3 * n3 n3 n3 n1 * n1 n1 n1 {
				System.out.println("YES");

			} System.out.println("YES") System.out.println System.out System System.out "YES" if(n1 * n1 == n3 * n3 + n2 * n2){
				System.out.println("YES");

			}else{
				System.out.println("NO");
			} n1 * n1 == n3 * n3 + n2 * n2 n1 * n1 n1 n1 n3 * n3 + n2 * n2 n3 * n3 n3 n3 n2 * n2 n2 n2 {
				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) {
		int n1;
		int n2;
		int n3;
		int date;

		Scanner scan = new Scanner(System.in);

		date = scan.nextInt();

		for(int i = 0 ; i < date ;i++){
			n1 = scan.nextInt();
			n2 = scan.nextInt();
			n3 = scan.nextInt();

			if(n3 * n3 == n2*n2+n1*n1){
				System.out.println("YES");

			}else if(n2 * n2 == n3 * n3 + n1 * n1){
				System.out.println("YES");

			}else if(n1 * n1 == n3 * n3 + n2 * n2){
				System.out.println("YES");

			}else{
				System.out.println("NO");
			}
		}

	}

} public class Main {

	public static void main(String[] args) {
		int n1;
		int n2;
		int n3;
		int date;

		Scanner scan = new Scanner(System.in);

		date = scan.nextInt();

		for(int i = 0 ; i < date ;i++){
			n1 = scan.nextInt();
			n2 = scan.nextInt();
			n3 = scan.nextInt();

			if(n3 * n3 == n2*n2+n1*n1){
				System.out.println("YES");

			}else if(n2 * n2 == n3 * n3 + n1 * n1){
				System.out.println("YES");

			}else if(n1 * n1 == n3 * n3 + n2 * n2){
				System.out.println("YES");

			}else{
				System.out.println("NO");
			}
		}

	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		int n1;
		int n2;
		int n3;
		int date;

		Scanner scan = new Scanner(System.in);

		date = scan.nextInt();

		for(int i = 0 ; i < date ;i++){
			n1 = scan.nextInt();
			n2 = scan.nextInt();
			n3 = scan.nextInt();

			if(n3 * n3 == n2*n2+n1*n1){
				System.out.println("YES");

			}else if(n2 * n2 == n3 * n3 + n1 * n1){
				System.out.println("YES");

			}else if(n1 * n1 == n3 * n3 + n2 * n2){
				System.out.println("YES");

			}else{
				System.out.println("NO");
			}
		}

	}

}