/* Volume0 0003 Is it a Right Triangle? */
import java.util.Scanner;

class Main{
	public static void main(String[] args){

		int n, temp;
		Scanner stdIn = new Scanner(System.in);
		n = stdIn.nextInt();
		int[][] side = new int[n][3];

		for( int i = 0; i < n; i++) {
			for( int j = 0; j < 3; j++) {
				side[i][j] = stdIn.nextInt();
			}
			if ( side[i][0] < side[i][1] ){
				temp = side[i][0] ;
				side[i][0] = side[i][1];
				side[i][1] = temp;
			}
			if ( side[i][0] < side[i][2] ){
				temp = side[i][0] ;
				side[i][0] = side[i][2];
				side[i][2] = temp;
			}
		}

		for( int i = 0; i < n; i++) {
			if ( side[i][0]*side[i][0] == side[i][1]*side[i][1] + side[i][2]*side[i][2] ){
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		}

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

		int n, temp;
		Scanner stdIn = new Scanner(System.in);
		n = stdIn.nextInt();
		int[][] side = new int[n][3];

		for( int i = 0; i < n; i++) {
			for( int j = 0; j < 3; j++) {
				side[i][j] = stdIn.nextInt();
			}
			if ( side[i][0] < side[i][1] ){
				temp = side[i][0] ;
				side[i][0] = side[i][1];
				side[i][1] = temp;
			}
			if ( side[i][0] < side[i][2] ){
				temp = side[i][0] ;
				side[i][0] = side[i][2];
				side[i][2] = temp;
			}
		}

		for( int i = 0; i < n; i++) {
			if ( side[i][0]*side[i][0] == side[i][1]*side[i][1] + side[i][2]*side[i][2] ){
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		}

	}
} Main public static void main(String[] args){

		int n, temp;
		Scanner stdIn = new Scanner(System.in);
		n = stdIn.nextInt();
		int[][] side = new int[n][3];

		for( int i = 0; i < n; i++) {
			for( int j = 0; j < 3; j++) {
				side[i][j] = stdIn.nextInt();
			}
			if ( side[i][0] < side[i][1] ){
				temp = side[i][0] ;
				side[i][0] = side[i][1];
				side[i][1] = temp;
			}
			if ( side[i][0] < side[i][2] ){
				temp = side[i][0] ;
				side[i][0] = side[i][2];
				side[i][2] = temp;
			}
		}

		for( int i = 0; i < n; i++) {
			if ( side[i][0]*side[i][0] == side[i][1]*side[i][1] + side[i][2]*side[i][2] ){
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		}

	} main {

		int n, temp;
		Scanner stdIn = new Scanner(System.in);
		n = stdIn.nextInt();
		int[][] side = new int[n][3];

		for( int i = 0; i < n; i++) {
			for( int j = 0; j < 3; j++) {
				side[i][j] = stdIn.nextInt();
			}
			if ( side[i][0] < side[i][1] ){
				temp = side[i][0] ;
				side[i][0] = side[i][1];
				side[i][1] = temp;
			}
			if ( side[i][0] < side[i][2] ){
				temp = side[i][0] ;
				side[i][0] = side[i][2];
				side[i][2] = temp;
			}
		}

		for( int i = 0; i < n; i++) {
			if ( side[i][0]*side[i][0] == side[i][1]*side[i][1] + side[i][2]*side[i][2] ){
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		}

	} int n n temp; temp Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) n = stdIn.nextInt() n stdIn.nextInt() stdIn.nextInt stdIn int[][] side = new int[n][3]; side new int[n][3] n 3 for( int i = 0; i < n; i++) {
			for( int j = 0; j < 3; j++) {
				side[i][j] = stdIn.nextInt();
			}
			if ( side[i][0] < side[i][1] ){
				temp = side[i][0] ;
				side[i][0] = side[i][1];
				side[i][1] = temp;
			}
			if ( side[i][0] < side[i][2] ){
				temp = side[i][0] ;
				side[i][0] = side[i][2];
				side[i][2] = temp;
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			for( int j = 0; j < 3; j++) {
				side[i][j] = stdIn.nextInt();
			}
			if ( side[i][0] < side[i][1] ){
				temp = side[i][0] ;
				side[i][0] = side[i][1];
				side[i][1] = temp;
			}
			if ( side[i][0] < side[i][2] ){
				temp = side[i][0] ;
				side[i][0] = side[i][2];
				side[i][2] = temp;
			}
		} {
			for( int j = 0; j < 3; j++) {
				side[i][j] = stdIn.nextInt();
			}
			if ( side[i][0] < side[i][1] ){
				temp = side[i][0] ;
				side[i][0] = side[i][1];
				side[i][1] = temp;
			}
			if ( side[i][0] < side[i][2] ){
				temp = side[i][0] ;
				side[i][0] = side[i][2];
				side[i][2] = temp;
			}
		} for( int j = 0; j < 3; j++) {
				side[i][j] = stdIn.nextInt();
			} int j = 0; int j = 0; j 0 j < 3 j 3 j++ j++ j {
				side[i][j] = stdIn.nextInt();
			} {
				side[i][j] = stdIn.nextInt();
			} side[i][j] = stdIn.nextInt() side[i][j] side[i] side i j stdIn.nextInt() stdIn.nextInt stdIn if ( side[i][0] < side[i][1] ){
				temp = side[i][0] ;
				side[i][0] = side[i][1];
				side[i][1] = temp;
			} side[i][0] < side[i][1] side[i][0] side[i] side i 0 side[i][1] side[i] side i 1 {
				temp = side[i][0] ;
				side[i][0] = side[i][1];
				side[i][1] = temp;
			} temp = side[i][0] temp side[i][0] side[i] side i 0 side[i][0] = side[i][1] side[i][0] side[i] side i 0 side[i][1] side[i] side i 1 side[i][1] = temp side[i][1] side[i] side i 1 temp if ( side[i][0] < side[i][2] ){
				temp = side[i][0] ;
				side[i][0] = side[i][2];
				side[i][2] = temp;
			} side[i][0] < side[i][2] side[i][0] side[i] side i 0 side[i][2] side[i] side i 2 {
				temp = side[i][0] ;
				side[i][0] = side[i][2];
				side[i][2] = temp;
			} temp = side[i][0] temp side[i][0] side[i] side i 0 side[i][0] = side[i][2] side[i][0] side[i] side i 0 side[i][2] side[i] side i 2 side[i][2] = temp side[i][2] side[i] side i 2 temp for( int i = 0; i < n; i++) {
			if ( side[i][0]*side[i][0] == side[i][1]*side[i][1] + side[i][2]*side[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 ( side[i][0]*side[i][0] == side[i][1]*side[i][1] + side[i][2]*side[i][2] ){
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		} {
			if ( side[i][0]*side[i][0] == side[i][1]*side[i][1] + side[i][2]*side[i][2] ){
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		} if ( side[i][0]*side[i][0] == side[i][1]*side[i][1] + side[i][2]*side[i][2] ){
				System.out.println("YES");
			} else {
				System.out.println("NO");
			} side[i][0]*side[i][0] == side[i][1]*side[i][1] + side[i][2]*side[i][2] side[i][0]*side[i][0] side[i][0] side[i] side i 0 side[i][0] side[i] side i 0 side[i][1]*side[i][1] + side[i][2]*side[i][2] side[i][1]*side[i][1] side[i][1] side[i] side i 1 side[i][1] side[i] side i 1 side[i][2]*side[i][2] side[i][2] side[i] side i 2 side[i][2] side[i] side 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
/* Volume0 0003 Is it a Right Triangle? */
import java.util.Scanner;

class Main{
	public static void main(String[] args){

		int n, temp;
		Scanner stdIn = new Scanner(System.in);
		n = stdIn.nextInt();
		int[][] side = new int[n][3];

		for( int i = 0; i < n; i++) {
			for( int j = 0; j < 3; j++) {
				side[i][j] = stdIn.nextInt();
			}
			if ( side[i][0] < side[i][1] ){
				temp = side[i][0] ;
				side[i][0] = side[i][1];
				side[i][1] = temp;
			}
			if ( side[i][0] < side[i][2] ){
				temp = side[i][0] ;
				side[i][0] = side[i][2];
				side[i][2] = temp;
			}
		}

		for( int i = 0; i < n; i++) {
			if ( side[i][0]*side[i][0] == side[i][1]*side[i][1] + side[i][2]*side[i][2] ){
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		}

	}
}