import java.util.*;
public class Main {
	public static void main(String[] args) {
		Scanner scanner=new Scanner(System.in);
		int N=scanner.nextInt();
		int T[]=new int[3];
		for(int i=0;i<N;i++){
			for(int j=0;j<3;j++)
				T[j]=scanner.nextInt();
			Arrays.sort(T);
			if(T[0]*T[0]+T[1]*T[1]==T[2]*T[2]){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		}
	}

} import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
		Scanner scanner=new Scanner(System.in);
		int N=scanner.nextInt();
		int T[]=new int[3];
		for(int i=0;i<N;i++){
			for(int j=0;j<3;j++)
				T[j]=scanner.nextInt();
			Arrays.sort(T);
			if(T[0]*T[0]+T[1]*T[1]==T[2]*T[2]){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		}
	}

} Main public static void main(String[] args) {
		Scanner scanner=new Scanner(System.in);
		int N=scanner.nextInt();
		int T[]=new int[3];
		for(int i=0;i<N;i++){
			for(int j=0;j<3;j++)
				T[j]=scanner.nextInt();
			Arrays.sort(T);
			if(T[0]*T[0]+T[1]*T[1]==T[2]*T[2]){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		}
	} main {
		Scanner scanner=new Scanner(System.in);
		int N=scanner.nextInt();
		int T[]=new int[3];
		for(int i=0;i<N;i++){
			for(int j=0;j<3;j++)
				T[j]=scanner.nextInt();
			Arrays.sort(T);
			if(T[0]*T[0]+T[1]*T[1]==T[2]*T[2]){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		}
	} Scanner scanner=new Scanner(System.in); scanner new Scanner(System.in) int N=scanner.nextInt(); N scanner.nextInt() scanner.nextInt scanner int T[]=new int[3]; T new int[3] 3 for(int i=0;i<N;i++){
			for(int j=0;j<3;j++)
				T[j]=scanner.nextInt();
			Arrays.sort(T);
			if(T[0]*T[0]+T[1]*T[1]==T[2]*T[2]){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		} int i=0; int i=0; i 0 i<N i N i++ i++ i {
			for(int j=0;j<3;j++)
				T[j]=scanner.nextInt();
			Arrays.sort(T);
			if(T[0]*T[0]+T[1]*T[1]==T[2]*T[2]){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		} {
			for(int j=0;j<3;j++)
				T[j]=scanner.nextInt();
			Arrays.sort(T);
			if(T[0]*T[0]+T[1]*T[1]==T[2]*T[2]){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		} for(int j=0;j<3;j++)
				T[j]=scanner.nextInt(); int j=0; int j=0; j 0 j<3 j 3 j++ j++ j T[j]=scanner.nextInt(); T[j]=scanner.nextInt() T[j] T j scanner.nextInt() scanner.nextInt scanner Arrays.sort(T) Arrays.sort Arrays T if(T[0]*T[0]+T[1]*T[1]==T[2]*T[2]){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			} T[0]*T[0]+T[1]*T[1]==T[2]*T[2] T[0]*T[0]+T[1]*T[1] T[0]*T[0] T[0] T 0 T[0] T 0 T[1]*T[1] T[1] T 1 T[1] T 1 T[2]*T[2] T[2] T 2 T[2] T 2 {
				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 N=scanner.nextInt();
		int T[]=new int[3];
		for(int i=0;i<N;i++){
			for(int j=0;j<3;j++)
				T[j]=scanner.nextInt();
			Arrays.sort(T);
			if(T[0]*T[0]+T[1]*T[1]==T[2]*T[2]){
				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 N=scanner.nextInt();
		int T[]=new int[3];
		for(int i=0;i<N;i++){
			for(int j=0;j<3;j++)
				T[j]=scanner.nextInt();
			Arrays.sort(T);
			if(T[0]*T[0]+T[1]*T[1]==T[2]*T[2]){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		}
	}

} Main
import java.util.*;
public class Main {
	public static void main(String[] args) {
		Scanner scanner=new Scanner(System.in);
		int N=scanner.nextInt();
		int T[]=new int[3];
		for(int i=0;i<N;i++){
			for(int j=0;j<3;j++)
				T[j]=scanner.nextInt();
			Arrays.sort(T);
			if(T[0]*T[0]+T[1]*T[1]==T[2]*T[2]){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		}
	}

}