import java.util.Scanner;
import java.util.Arrays;

class Main {

    static int square(int i){
	return i * i;
    }

    public static void main(String[] args){
	Scanner stdin = new Scanner(System.in);
	int limit = stdin.nextInt();
	int[] num = new int[3];
	for(int i = 0; i < limit; i++){
	    for(int j = 0; j < 3; j++){
		num[j] = stdin.nextInt();
	    }
	    Arrays.sort(num);
	    System.out.println(square(num[0]) + square(num[1]) == square(num[2]) ? "YES" : "NO");
	}
    }
} import java.util.Scanner; Scanner java.util import java.util.Arrays; Arrays java.util class Main {

    static int square(int i){
	return i * i;
    }

    public static void main(String[] args){
	Scanner stdin = new Scanner(System.in);
	int limit = stdin.nextInt();
	int[] num = new int[3];
	for(int i = 0; i < limit; i++){
	    for(int j = 0; j < 3; j++){
		num[j] = stdin.nextInt();
	    }
	    Arrays.sort(num);
	    System.out.println(square(num[0]) + square(num[1]) == square(num[2]) ? "YES" : "NO");
	}
    }
} Main static int square(int i){
	return i * i;
    } square {
	return i * i;
    } return i * i; i * i i i int i i public static void main(String[] args){
	Scanner stdin = new Scanner(System.in);
	int limit = stdin.nextInt();
	int[] num = new int[3];
	for(int i = 0; i < limit; i++){
	    for(int j = 0; j < 3; j++){
		num[j] = stdin.nextInt();
	    }
	    Arrays.sort(num);
	    System.out.println(square(num[0]) + square(num[1]) == square(num[2]) ? "YES" : "NO");
	}
    } main {
	Scanner stdin = new Scanner(System.in);
	int limit = stdin.nextInt();
	int[] num = new int[3];
	for(int i = 0; i < limit; i++){
	    for(int j = 0; j < 3; j++){
		num[j] = stdin.nextInt();
	    }
	    Arrays.sort(num);
	    System.out.println(square(num[0]) + square(num[1]) == square(num[2]) ? "YES" : "NO");
	}
    } Scanner stdin = new Scanner(System.in); stdin new Scanner(System.in) int limit = stdin.nextInt(); limit stdin.nextInt() stdin.nextInt stdin int[] num = new int[3]; num new int[3] 3 for(int i = 0; i < limit; i++){
	    for(int j = 0; j < 3; j++){
		num[j] = stdin.nextInt();
	    }
	    Arrays.sort(num);
	    System.out.println(square(num[0]) + square(num[1]) == square(num[2]) ? "YES" : "NO");
	} int i = 0; int i = 0; i 0 i < limit i limit i++ i++ i {
	    for(int j = 0; j < 3; j++){
		num[j] = stdin.nextInt();
	    }
	    Arrays.sort(num);
	    System.out.println(square(num[0]) + square(num[1]) == square(num[2]) ? "YES" : "NO");
	} {
	    for(int j = 0; j < 3; j++){
		num[j] = stdin.nextInt();
	    }
	    Arrays.sort(num);
	    System.out.println(square(num[0]) + square(num[1]) == square(num[2]) ? "YES" : "NO");
	} for(int j = 0; j < 3; j++){
		num[j] = stdin.nextInt();
	    } int j = 0; int j = 0; j 0 j < 3 j 3 j++ j++ j {
		num[j] = stdin.nextInt();
	    } {
		num[j] = stdin.nextInt();
	    } num[j] = stdin.nextInt() num[j] num j stdin.nextInt() stdin.nextInt stdin Arrays.sort(num) Arrays.sort Arrays num System.out.println(square(num[0]) + square(num[1]) == square(num[2]) ? "YES" : "NO") System.out.println System.out System System.out square(num[0]) + square(num[1]) == square(num[2]) ? "YES" : "NO" square(num[0]) + square(num[1]) == square(num[2]) square(num[0]) + square(num[1]) square(num[0]) square num[0] num 0 square(num[1]) square num[1] num 1 square(num[2]) square num[2] num 2 "YES" "NO" String[] args args
import java.util.Scanner;
import java.util.Arrays;

class Main {

    static int square(int i){
	return i * i;
    }

    public static void main(String[] args){
	Scanner stdin = new Scanner(System.in);
	int limit = stdin.nextInt();
	int[] num = new int[3];
	for(int i = 0; i < limit; i++){
	    for(int j = 0; j < 3; j++){
		num[j] = stdin.nextInt();
	    }
	    Arrays.sort(num);
	    System.out.println(square(num[0]) + square(num[1]) == square(num[2]) ? "YES" : "NO");
	}
    }
}