import java.util.*;

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

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