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


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


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