import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);

		int n=sc.nextInt();

		for(int i=0;i<n;i++){
			int a=sc.nextInt(),b=sc.nextInt(),c=sc.nextInt();
			switch(biggestLength(a, b, c)){
			case 'a':
				if(isRightTriangle(a,b,c)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			case 'b':
				if(isRightTriangle(b, a, c)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			case 'c':
				if(isRightTriangle(c, a, b)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}

				break;
			}

		}

	}

	static char biggestLength(int a,int b,int c){
		if(a<=b){
			if(b<=c){
				return 'c';
			}else{
				return 'b';
			}
		}else if(a<=c){
			return 'c';
		}else{
			return 'a';
		}
	}

	static boolean isRightTriangle(int longest,int other1,int other2){
		int longestP=longest*longest;
		int other1P=other1*other1;
		int other2P=other2*other2;

		return longestP==other2P+other1P;

	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);

		int n=sc.nextInt();

		for(int i=0;i<n;i++){
			int a=sc.nextInt(),b=sc.nextInt(),c=sc.nextInt();
			switch(biggestLength(a, b, c)){
			case 'a':
				if(isRightTriangle(a,b,c)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			case 'b':
				if(isRightTriangle(b, a, c)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			case 'c':
				if(isRightTriangle(c, a, b)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}

				break;
			}

		}

	}

	static char biggestLength(int a,int b,int c){
		if(a<=b){
			if(b<=c){
				return 'c';
			}else{
				return 'b';
			}
		}else if(a<=c){
			return 'c';
		}else{
			return 'a';
		}
	}

	static boolean isRightTriangle(int longest,int other1,int other2){
		int longestP=longest*longest;
		int other1P=other1*other1;
		int other2P=other2*other2;

		return longestP==other2P+other1P;

	}
} Main public static void main(String[] args){
		Scanner sc=new Scanner(System.in);

		int n=sc.nextInt();

		for(int i=0;i<n;i++){
			int a=sc.nextInt(),b=sc.nextInt(),c=sc.nextInt();
			switch(biggestLength(a, b, c)){
			case 'a':
				if(isRightTriangle(a,b,c)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			case 'b':
				if(isRightTriangle(b, a, c)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			case 'c':
				if(isRightTriangle(c, a, b)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}

				break;
			}

		}

	} main {
		Scanner sc=new Scanner(System.in);

		int n=sc.nextInt();

		for(int i=0;i<n;i++){
			int a=sc.nextInt(),b=sc.nextInt(),c=sc.nextInt();
			switch(biggestLength(a, b, c)){
			case 'a':
				if(isRightTriangle(a,b,c)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			case 'b':
				if(isRightTriangle(b, a, c)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			case 'c':
				if(isRightTriangle(c, a, b)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}

				break;
			}

		}

	} Scanner sc=new Scanner(System.in); sc new Scanner(System.in) int n=sc.nextInt(); n sc.nextInt() sc.nextInt sc for(int i=0;i<n;i++){
			int a=sc.nextInt(),b=sc.nextInt(),c=sc.nextInt();
			switch(biggestLength(a, b, c)){
			case 'a':
				if(isRightTriangle(a,b,c)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			case 'b':
				if(isRightTriangle(b, a, c)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			case 'c':
				if(isRightTriangle(c, a, b)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}

				break;
			}

		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			int a=sc.nextInt(),b=sc.nextInt(),c=sc.nextInt();
			switch(biggestLength(a, b, c)){
			case 'a':
				if(isRightTriangle(a,b,c)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			case 'b':
				if(isRightTriangle(b, a, c)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			case 'c':
				if(isRightTriangle(c, a, b)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}

				break;
			}

		} {
			int a=sc.nextInt(),b=sc.nextInt(),c=sc.nextInt();
			switch(biggestLength(a, b, c)){
			case 'a':
				if(isRightTriangle(a,b,c)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			case 'b':
				if(isRightTriangle(b, a, c)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			case 'c':
				if(isRightTriangle(c, a, b)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}

				break;
			}

		} int a=sc.nextInt() a sc.nextInt() sc.nextInt sc b=sc.nextInt() b sc.nextInt() sc.nextInt sc c=sc.nextInt(); c sc.nextInt() sc.nextInt sc switch(biggestLength(a, b, c)){
			case 'a':
				if(isRightTriangle(a,b,c)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			case 'b':
				if(isRightTriangle(b, a, c)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			case 'c':
				if(isRightTriangle(c, a, b)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}

				break;
			} biggestLength(a, b, c) biggestLength a b c case 'a': 'a' case 'a': if(isRightTriangle(a,b,c)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				} isRightTriangle(a,b,c) isRightTriangle a b 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" break; case 'b': 'b' case 'b': if(isRightTriangle(b, a, c)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				} isRightTriangle(b, a, c) isRightTriangle b a 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" break; case 'c': 'c' case 'c': if(isRightTriangle(c, a, b)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				} isRightTriangle(c, a, b) isRightTriangle c a 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" break; String[] args args static char biggestLength(int a,int b,int c){
		if(a<=b){
			if(b<=c){
				return 'c';
			}else{
				return 'b';
			}
		}else if(a<=c){
			return 'c';
		}else{
			return 'a';
		}
	} biggestLength {
		if(a<=b){
			if(b<=c){
				return 'c';
			}else{
				return 'b';
			}
		}else if(a<=c){
			return 'c';
		}else{
			return 'a';
		}
	} if(a<=b){
			if(b<=c){
				return 'c';
			}else{
				return 'b';
			}
		}else if(a<=c){
			return 'c';
		}else{
			return 'a';
		} a<=b a b {
			if(b<=c){
				return 'c';
			}else{
				return 'b';
			}
		} if(b<=c){
				return 'c';
			}else{
				return 'b';
			} b<=c b c {
				return 'c';
			} return 'c'; 'c' {
				return 'b';
			} return 'b'; 'b' if(a<=c){
			return 'c';
		}else{
			return 'a';
		} a<=c a c {
			return 'c';
		} return 'c'; 'c' {
			return 'a';
		} return 'a'; 'a' int a a int b b int c c static boolean isRightTriangle(int longest,int other1,int other2){
		int longestP=longest*longest;
		int other1P=other1*other1;
		int other2P=other2*other2;

		return longestP==other2P+other1P;

	} isRightTriangle {
		int longestP=longest*longest;
		int other1P=other1*other1;
		int other2P=other2*other2;

		return longestP==other2P+other1P;

	} int longestP=longest*longest; longestP longest*longest longest longest int other1P=other1*other1; other1P other1*other1 other1 other1 int other2P=other2*other2; other2P other2*other2 other2 other2 return longestP==other2P+other1P; longestP==other2P+other1P longestP other2P+other1P other2P other1P int longest longest int other1 other1 int other2 other2 public class Main {
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);

		int n=sc.nextInt();

		for(int i=0;i<n;i++){
			int a=sc.nextInt(),b=sc.nextInt(),c=sc.nextInt();
			switch(biggestLength(a, b, c)){
			case 'a':
				if(isRightTriangle(a,b,c)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			case 'b':
				if(isRightTriangle(b, a, c)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			case 'c':
				if(isRightTriangle(c, a, b)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}

				break;
			}

		}

	}

	static char biggestLength(int a,int b,int c){
		if(a<=b){
			if(b<=c){
				return 'c';
			}else{
				return 'b';
			}
		}else if(a<=c){
			return 'c';
		}else{
			return 'a';
		}
	}

	static boolean isRightTriangle(int longest,int other1,int other2){
		int longestP=longest*longest;
		int other1P=other1*other1;
		int other2P=other2*other2;

		return longestP==other2P+other1P;

	}
} public class Main {
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);

		int n=sc.nextInt();

		for(int i=0;i<n;i++){
			int a=sc.nextInt(),b=sc.nextInt(),c=sc.nextInt();
			switch(biggestLength(a, b, c)){
			case 'a':
				if(isRightTriangle(a,b,c)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			case 'b':
				if(isRightTriangle(b, a, c)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			case 'c':
				if(isRightTriangle(c, a, b)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}

				break;
			}

		}

	}

	static char biggestLength(int a,int b,int c){
		if(a<=b){
			if(b<=c){
				return 'c';
			}else{
				return 'b';
			}
		}else if(a<=c){
			return 'c';
		}else{
			return 'a';
		}
	}

	static boolean isRightTriangle(int longest,int other1,int other2){
		int longestP=longest*longest;
		int other1P=other1*other1;
		int other2P=other2*other2;

		return longestP==other2P+other1P;

	}
} Main
import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);

		int n=sc.nextInt();

		for(int i=0;i<n;i++){
			int a=sc.nextInt(),b=sc.nextInt(),c=sc.nextInt();
			switch(biggestLength(a, b, c)){
			case 'a':
				if(isRightTriangle(a,b,c)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			case 'b':
				if(isRightTriangle(b, a, c)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			case 'c':
				if(isRightTriangle(c, a, b)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}

				break;
			}

		}

	}

	static char biggestLength(int a,int b,int c){
		if(a<=b){
			if(b<=c){
				return 'c';
			}else{
				return 'b';
			}
		}else if(a<=c){
			return 'c';
		}else{
			return 'a';
		}
	}

	static boolean isRightTriangle(int longest,int other1,int other2){
		int longestP=longest*longest;
		int other1P=other1*other1;
		int other2P=other2*other2;

		return longestP==other2P+other1P;

	}
}