import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[][] t = new int[N][3];
		int tmp;
		for(int i=0;i<N;i++){
			for(int j=0;j<3;j++){
				t[i][j] = sc.nextInt();
				if(j==1&&t[i][0]>t[i][1]){
					tmp = t[i][0];
					t[i][0] = t[i][1];
					t[i][1] = tmp;
				}
				if(j==2&&t[i][1]>t[i][2]){
					tmp = t[i][1];
					t[i][1] = t[i][2];
					t[i][2] = tmp;
				}
			}
		}
		for(int i=0;i<N;i++){
			if(t[i][0]*t[i][0]+t[i][1]*t[i][1]==t[i][2]*t[i][2]){
				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 sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[][] t = new int[N][3];
		int tmp;
		for(int i=0;i<N;i++){
			for(int j=0;j<3;j++){
				t[i][j] = sc.nextInt();
				if(j==1&&t[i][0]>t[i][1]){
					tmp = t[i][0];
					t[i][0] = t[i][1];
					t[i][1] = tmp;
				}
				if(j==2&&t[i][1]>t[i][2]){
					tmp = t[i][1];
					t[i][1] = t[i][2];
					t[i][2] = tmp;
				}
			}
		}
		for(int i=0;i<N;i++){
			if(t[i][0]*t[i][0]+t[i][1]*t[i][1]==t[i][2]*t[i][2]){
				System.out.println("YES");
			}
			else{
				System.out.println("NO");
			}
		}
		
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[][] t = new int[N][3];
		int tmp;
		for(int i=0;i<N;i++){
			for(int j=0;j<3;j++){
				t[i][j] = sc.nextInt();
				if(j==1&&t[i][0]>t[i][1]){
					tmp = t[i][0];
					t[i][0] = t[i][1];
					t[i][1] = tmp;
				}
				if(j==2&&t[i][1]>t[i][2]){
					tmp = t[i][1];
					t[i][1] = t[i][2];
					t[i][2] = tmp;
				}
			}
		}
		for(int i=0;i<N;i++){
			if(t[i][0]*t[i][0]+t[i][1]*t[i][1]==t[i][2]*t[i][2]){
				System.out.println("YES");
			}
			else{
				System.out.println("NO");
			}
		}
		
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[][] t = new int[N][3];
		int tmp;
		for(int i=0;i<N;i++){
			for(int j=0;j<3;j++){
				t[i][j] = sc.nextInt();
				if(j==1&&t[i][0]>t[i][1]){
					tmp = t[i][0];
					t[i][0] = t[i][1];
					t[i][1] = tmp;
				}
				if(j==2&&t[i][1]>t[i][2]){
					tmp = t[i][1];
					t[i][1] = t[i][2];
					t[i][2] = tmp;
				}
			}
		}
		for(int i=0;i<N;i++){
			if(t[i][0]*t[i][0]+t[i][1]*t[i][1]==t[i][2]*t[i][2]){
				System.out.println("YES");
			}
			else{
				System.out.println("NO");
			}
		}
		
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int[][] t = new int[N][3]; t new int[N][3] N 3 int tmp; tmp for(int i=0;i<N;i++){
			for(int j=0;j<3;j++){
				t[i][j] = sc.nextInt();
				if(j==1&&t[i][0]>t[i][1]){
					tmp = t[i][0];
					t[i][0] = t[i][1];
					t[i][1] = tmp;
				}
				if(j==2&&t[i][1]>t[i][2]){
					tmp = t[i][1];
					t[i][1] = t[i][2];
					t[i][2] = tmp;
				}
			}
		} int i=0; int i=0; i 0 i<N i N i++ i++ i {
			for(int j=0;j<3;j++){
				t[i][j] = sc.nextInt();
				if(j==1&&t[i][0]>t[i][1]){
					tmp = t[i][0];
					t[i][0] = t[i][1];
					t[i][1] = tmp;
				}
				if(j==2&&t[i][1]>t[i][2]){
					tmp = t[i][1];
					t[i][1] = t[i][2];
					t[i][2] = tmp;
				}
			}
		} {
			for(int j=0;j<3;j++){
				t[i][j] = sc.nextInt();
				if(j==1&&t[i][0]>t[i][1]){
					tmp = t[i][0];
					t[i][0] = t[i][1];
					t[i][1] = tmp;
				}
				if(j==2&&t[i][1]>t[i][2]){
					tmp = t[i][1];
					t[i][1] = t[i][2];
					t[i][2] = tmp;
				}
			}
		} for(int j=0;j<3;j++){
				t[i][j] = sc.nextInt();
				if(j==1&&t[i][0]>t[i][1]){
					tmp = t[i][0];
					t[i][0] = t[i][1];
					t[i][1] = tmp;
				}
				if(j==2&&t[i][1]>t[i][2]){
					tmp = t[i][1];
					t[i][1] = t[i][2];
					t[i][2] = tmp;
				}
			} int j=0; int j=0; j 0 j<3 j 3 j++ j++ j {
				t[i][j] = sc.nextInt();
				if(j==1&&t[i][0]>t[i][1]){
					tmp = t[i][0];
					t[i][0] = t[i][1];
					t[i][1] = tmp;
				}
				if(j==2&&t[i][1]>t[i][2]){
					tmp = t[i][1];
					t[i][1] = t[i][2];
					t[i][2] = tmp;
				}
			} {
				t[i][j] = sc.nextInt();
				if(j==1&&t[i][0]>t[i][1]){
					tmp = t[i][0];
					t[i][0] = t[i][1];
					t[i][1] = tmp;
				}
				if(j==2&&t[i][1]>t[i][2]){
					tmp = t[i][1];
					t[i][1] = t[i][2];
					t[i][2] = tmp;
				}
			} t[i][j] = sc.nextInt() t[i][j] t[i] t i j sc.nextInt() sc.nextInt sc if(j==1&&t[i][0]>t[i][1]){
					tmp = t[i][0];
					t[i][0] = t[i][1];
					t[i][1] = tmp;
				} j==1&&t[i][0]>t[i][1] j==1 j 1 t[i][0]>t[i][1] t[i][0] t[i] t i 0 t[i][1] t[i] t i 1 {
					tmp = t[i][0];
					t[i][0] = t[i][1];
					t[i][1] = tmp;
				} tmp = t[i][0] tmp t[i][0] t[i] t i 0 t[i][0] = t[i][1] t[i][0] t[i] t i 0 t[i][1] t[i] t i 1 t[i][1] = tmp t[i][1] t[i] t i 1 tmp if(j==2&&t[i][1]>t[i][2]){
					tmp = t[i][1];
					t[i][1] = t[i][2];
					t[i][2] = tmp;
				} j==2&&t[i][1]>t[i][2] j==2 j 2 t[i][1]>t[i][2] t[i][1] t[i] t i 1 t[i][2] t[i] t i 2 {
					tmp = t[i][1];
					t[i][1] = t[i][2];
					t[i][2] = tmp;
				} tmp = t[i][1] tmp t[i][1] t[i] t i 1 t[i][1] = t[i][2] t[i][1] t[i] t i 1 t[i][2] t[i] t i 2 t[i][2] = tmp t[i][2] t[i] t i 2 tmp for(int i=0;i<N;i++){
			if(t[i][0]*t[i][0]+t[i][1]*t[i][1]==t[i][2]*t[i][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 {
			if(t[i][0]*t[i][0]+t[i][1]*t[i][1]==t[i][2]*t[i][2]){
				System.out.println("YES");
			}
			else{
				System.out.println("NO");
			}
		} {
			if(t[i][0]*t[i][0]+t[i][1]*t[i][1]==t[i][2]*t[i][2]){
				System.out.println("YES");
			}
			else{
				System.out.println("NO");
			}
		} if(t[i][0]*t[i][0]+t[i][1]*t[i][1]==t[i][2]*t[i][2]){
				System.out.println("YES");
			}
			else{
				System.out.println("NO");
			} t[i][0]*t[i][0]+t[i][1]*t[i][1]==t[i][2]*t[i][2] t[i][0]*t[i][0]+t[i][1]*t[i][1] t[i][0]*t[i][0] t[i][0] t[i] t i 0 t[i][0] t[i] t i 0 t[i][1]*t[i][1] t[i][1] t[i] t i 1 t[i][1] t[i] t i 1 t[i][2]*t[i][2] t[i][2] t[i] t i 2 t[i][2] t[i] t i 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 sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[][] t = new int[N][3];
		int tmp;
		for(int i=0;i<N;i++){
			for(int j=0;j<3;j++){
				t[i][j] = sc.nextInt();
				if(j==1&&t[i][0]>t[i][1]){
					tmp = t[i][0];
					t[i][0] = t[i][1];
					t[i][1] = tmp;
				}
				if(j==2&&t[i][1]>t[i][2]){
					tmp = t[i][1];
					t[i][1] = t[i][2];
					t[i][2] = tmp;
				}
			}
		}
		for(int i=0;i<N;i++){
			if(t[i][0]*t[i][0]+t[i][1]*t[i][1]==t[i][2]*t[i][2]){
				System.out.println("YES");
			}
			else{
				System.out.println("NO");
			}
		}
		
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[][] t = new int[N][3];
		int tmp;
		for(int i=0;i<N;i++){
			for(int j=0;j<3;j++){
				t[i][j] = sc.nextInt();
				if(j==1&&t[i][0]>t[i][1]){
					tmp = t[i][0];
					t[i][0] = t[i][1];
					t[i][1] = tmp;
				}
				if(j==2&&t[i][1]>t[i][2]){
					tmp = t[i][1];
					t[i][1] = t[i][2];
					t[i][2] = tmp;
				}
			}
		}
		for(int i=0;i<N;i++){
			if(t[i][0]*t[i][0]+t[i][1]*t[i][1]==t[i][2]*t[i][2]){
				System.out.println("YES");
			}
			else{
				System.out.println("NO");
			}
		}
		
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[][] t = new int[N][3];
		int tmp;
		for(int i=0;i<N;i++){
			for(int j=0;j<3;j++){
				t[i][j] = sc.nextInt();
				if(j==1&&t[i][0]>t[i][1]){
					tmp = t[i][0];
					t[i][0] = t[i][1];
					t[i][1] = tmp;
				}
				if(j==2&&t[i][1]>t[i][2]){
					tmp = t[i][1];
					t[i][1] = t[i][2];
					t[i][2] = tmp;
				}
			}
		}
		for(int i=0;i<N;i++){
			if(t[i][0]*t[i][0]+t[i][1]*t[i][1]==t[i][2]*t[i][2]){
				System.out.println("YES");
			}
			else{
				System.out.println("NO");
			}
		}
		
	}
}