import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;

class Main {

	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String num1 = br.readLine();

		StringBuilder bf = new StringBuilder();

		int[] num = new int[3];

		for(int i=0; i<Integer.parseInt(num1);i++){


		String[] str = br.readLine().split(" ");

		for(int k=0; k<3; k++){
			num[k] = Integer.parseInt(str[k]);
		}

		Arrays.sort(num);


		if(num[2]*num[2] == (num[1]*num[1])+(num[0]*num[0])){
			bf.append("YES").append("\n");
		}else {
			bf.append("NO").append("\n");

		}

		}

		System.out.print(bf);


	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Arrays; Arrays java.util class Main {

	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String num1 = br.readLine();

		StringBuilder bf = new StringBuilder();

		int[] num = new int[3];

		for(int i=0; i<Integer.parseInt(num1);i++){


		String[] str = br.readLine().split(" ");

		for(int k=0; k<3; k++){
			num[k] = Integer.parseInt(str[k]);
		}

		Arrays.sort(num);


		if(num[2]*num[2] == (num[1]*num[1])+(num[0]*num[0])){
			bf.append("YES").append("\n");
		}else {
			bf.append("NO").append("\n");

		}

		}

		System.out.print(bf);


	}

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

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String num1 = br.readLine();

		StringBuilder bf = new StringBuilder();

		int[] num = new int[3];

		for(int i=0; i<Integer.parseInt(num1);i++){


		String[] str = br.readLine().split(" ");

		for(int k=0; k<3; k++){
			num[k] = Integer.parseInt(str[k]);
		}

		Arrays.sort(num);


		if(num[2]*num[2] == (num[1]*num[1])+(num[0]*num[0])){
			bf.append("YES").append("\n");
		}else {
			bf.append("NO").append("\n");

		}

		}

		System.out.print(bf);


	} main {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String num1 = br.readLine();

		StringBuilder bf = new StringBuilder();

		int[] num = new int[3];

		for(int i=0; i<Integer.parseInt(num1);i++){


		String[] str = br.readLine().split(" ");

		for(int k=0; k<3; k++){
			num[k] = Integer.parseInt(str[k]);
		}

		Arrays.sort(num);


		if(num[2]*num[2] == (num[1]*num[1])+(num[0]*num[0])){
			bf.append("YES").append("\n");
		}else {
			bf.append("NO").append("\n");

		}

		}

		System.out.print(bf);


	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String num1 = br.readLine(); num1 br.readLine() br.readLine br StringBuilder bf = new StringBuilder(); bf new StringBuilder() int[] num = new int[3]; num new int[3] 3 for(int i=0; i<Integer.parseInt(num1);i++){


		String[] str = br.readLine().split(" ");

		for(int k=0; k<3; k++){
			num[k] = Integer.parseInt(str[k]);
		}

		Arrays.sort(num);


		if(num[2]*num[2] == (num[1]*num[1])+(num[0]*num[0])){
			bf.append("YES").append("\n");
		}else {
			bf.append("NO").append("\n");

		}

		} int i=0; int i=0; i 0 i<Integer.parseInt(num1) i Integer.parseInt(num1) Integer.parseInt Integer num1 i++ i++ i {


		String[] str = br.readLine().split(" ");

		for(int k=0; k<3; k++){
			num[k] = Integer.parseInt(str[k]);
		}

		Arrays.sort(num);


		if(num[2]*num[2] == (num[1]*num[1])+(num[0]*num[0])){
			bf.append("YES").append("\n");
		}else {
			bf.append("NO").append("\n");

		}

		} {


		String[] str = br.readLine().split(" ");

		for(int k=0; k<3; k++){
			num[k] = Integer.parseInt(str[k]);
		}

		Arrays.sort(num);


		if(num[2]*num[2] == (num[1]*num[1])+(num[0]*num[0])){
			bf.append("YES").append("\n");
		}else {
			bf.append("NO").append("\n");

		}

		} String[] str = br.readLine().split(" "); str br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " for(int k=0; k<3; k++){
			num[k] = Integer.parseInt(str[k]);
		} int k=0; int k=0; k 0 k<3 k 3 k++ k++ k {
			num[k] = Integer.parseInt(str[k]);
		} {
			num[k] = Integer.parseInt(str[k]);
		} num[k] = Integer.parseInt(str[k]) num[k] num k Integer.parseInt(str[k]) Integer.parseInt Integer str[k] str k Arrays.sort(num) Arrays.sort Arrays num if(num[2]*num[2] == (num[1]*num[1])+(num[0]*num[0])){
			bf.append("YES").append("\n");
		}else {
			bf.append("NO").append("\n");

		} num[2]*num[2] == (num[1]*num[1])+(num[0]*num[0]) num[2]*num[2] num[2] num 2 num[2] num 2 (num[1]*num[1])+(num[0]*num[0]) (num[1]*num[1]) num[1] num 1 num[1] num 1 (num[0]*num[0]) num[0] num 0 num[0] num 0 {
			bf.append("YES").append("\n");
		} bf.append("YES").append("\n") bf.append("YES").append bf.append("YES") bf.append bf "YES" "\n" {
			bf.append("NO").append("\n");

		} bf.append("NO").append("\n") bf.append("NO").append bf.append("NO") bf.append bf "NO" "\n" System.out.print(bf) System.out.print System.out System System.out bf String[] args args
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;

class Main {

	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String num1 = br.readLine();

		StringBuilder bf = new StringBuilder();

		int[] num = new int[3];

		for(int i=0; i<Integer.parseInt(num1);i++){


		String[] str = br.readLine().split(" ");

		for(int k=0; k<3; k++){
			num[k] = Integer.parseInt(str[k]);
		}

		Arrays.sort(num);


		if(num[2]*num[2] == (num[1]*num[1])+(num[0]*num[0])){
			bf.append("YES").append("\n");
		}else {
			bf.append("NO").append("\n");

		}

		}

		System.out.print(bf);


	}

}