import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.lang.Math;
public class Main {

	public static void main(String[] args) {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);

		String col = "0";	//入力する行数
		String[] cols = null;
		int colInt = 0;

		//行数の入力後、三角形の三辺の長さを入力
		try {
			col = br.readLine();
			colInt = Integer.parseInt(col);
			cols = new String[colInt];

			for(int i = 0;i < colInt;i++){
				cols[i] = br.readLine();
			}
		}catch(IOException e){

		}

		//値の分離
		int[][] triangle = new int[colInt][3];
		for(int i = 0;i < colInt;i++){
			String[] temp = cols[i].split(" ");
			triangle[i][0] = Integer.parseInt(temp[0]);
			triangle[i][1] = Integer.parseInt(temp[1]);
			triangle[i][2] = Integer.parseInt(temp[2]);
		}
		for(int i = 0;i < colInt;i++){
			//三角形ごとに、最長の辺を求める
			int maxIndex = 0;
			if(triangle[i][maxIndex] < triangle[i][1]){
				maxIndex = 1;
			}
			if(triangle[i][maxIndex] < triangle[i][2]){
				maxIndex = 2;
			}
			//三角形が直角三角形であるかを求める
			switch (maxIndex){
			case 0:
				if(Math.pow(triangle[i][0],2) == Math.pow(triangle[i][1],2) + Math.pow(triangle[i][2],2)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			case 1:
				if(Math.pow(triangle[i][1],2) == Math.pow(triangle[i][0],2) + Math.pow(triangle[i][2],2)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			case 2:
				if(Math.pow(triangle[i][2],2) == Math.pow(triangle[i][0],2) + Math.pow(triangle[i][1],2)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			}

		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.lang.Math; Math java.lang public class Main {

	public static void main(String[] args) {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);

		String col = "0";	//入力する行数
		String[] cols = null;
		int colInt = 0;

		//行数の入力後、三角形の三辺の長さを入力
		try {
			col = br.readLine();
			colInt = Integer.parseInt(col);
			cols = new String[colInt];

			for(int i = 0;i < colInt;i++){
				cols[i] = br.readLine();
			}
		}catch(IOException e){

		}

		//値の分離
		int[][] triangle = new int[colInt][3];
		for(int i = 0;i < colInt;i++){
			String[] temp = cols[i].split(" ");
			triangle[i][0] = Integer.parseInt(temp[0]);
			triangle[i][1] = Integer.parseInt(temp[1]);
			triangle[i][2] = Integer.parseInt(temp[2]);
		}
		for(int i = 0;i < colInt;i++){
			//三角形ごとに、最長の辺を求める
			int maxIndex = 0;
			if(triangle[i][maxIndex] < triangle[i][1]){
				maxIndex = 1;
			}
			if(triangle[i][maxIndex] < triangle[i][2]){
				maxIndex = 2;
			}
			//三角形が直角三角形であるかを求める
			switch (maxIndex){
			case 0:
				if(Math.pow(triangle[i][0],2) == Math.pow(triangle[i][1],2) + Math.pow(triangle[i][2],2)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			case 1:
				if(Math.pow(triangle[i][1],2) == Math.pow(triangle[i][0],2) + Math.pow(triangle[i][2],2)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			case 2:
				if(Math.pow(triangle[i][2],2) == Math.pow(triangle[i][0],2) + Math.pow(triangle[i][1],2)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			}

		}
	}
} Main public static void main(String[] args) {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);

		String col = "0";	//入力する行数
		String[] cols = null;
		int colInt = 0;

		//行数の入力後、三角形の三辺の長さを入力
		try {
			col = br.readLine();
			colInt = Integer.parseInt(col);
			cols = new String[colInt];

			for(int i = 0;i < colInt;i++){
				cols[i] = br.readLine();
			}
		}catch(IOException e){

		}

		//値の分離
		int[][] triangle = new int[colInt][3];
		for(int i = 0;i < colInt;i++){
			String[] temp = cols[i].split(" ");
			triangle[i][0] = Integer.parseInt(temp[0]);
			triangle[i][1] = Integer.parseInt(temp[1]);
			triangle[i][2] = Integer.parseInt(temp[2]);
		}
		for(int i = 0;i < colInt;i++){
			//三角形ごとに、最長の辺を求める
			int maxIndex = 0;
			if(triangle[i][maxIndex] < triangle[i][1]){
				maxIndex = 1;
			}
			if(triangle[i][maxIndex] < triangle[i][2]){
				maxIndex = 2;
			}
			//三角形が直角三角形であるかを求める
			switch (maxIndex){
			case 0:
				if(Math.pow(triangle[i][0],2) == Math.pow(triangle[i][1],2) + Math.pow(triangle[i][2],2)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			case 1:
				if(Math.pow(triangle[i][1],2) == Math.pow(triangle[i][0],2) + Math.pow(triangle[i][2],2)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			case 2:
				if(Math.pow(triangle[i][2],2) == Math.pow(triangle[i][0],2) + Math.pow(triangle[i][1],2)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			}

		}
	} main {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);

		String col = "0";	//入力する行数
		String[] cols = null;
		int colInt = 0;

		//行数の入力後、三角形の三辺の長さを入力
		try {
			col = br.readLine();
			colInt = Integer.parseInt(col);
			cols = new String[colInt];

			for(int i = 0;i < colInt;i++){
				cols[i] = br.readLine();
			}
		}catch(IOException e){

		}

		//値の分離
		int[][] triangle = new int[colInt][3];
		for(int i = 0;i < colInt;i++){
			String[] temp = cols[i].split(" ");
			triangle[i][0] = Integer.parseInt(temp[0]);
			triangle[i][1] = Integer.parseInt(temp[1]);
			triangle[i][2] = Integer.parseInt(temp[2]);
		}
		for(int i = 0;i < colInt;i++){
			//三角形ごとに、最長の辺を求める
			int maxIndex = 0;
			if(triangle[i][maxIndex] < triangle[i][1]){
				maxIndex = 1;
			}
			if(triangle[i][maxIndex] < triangle[i][2]){
				maxIndex = 2;
			}
			//三角形が直角三角形であるかを求める
			switch (maxIndex){
			case 0:
				if(Math.pow(triangle[i][0],2) == Math.pow(triangle[i][1],2) + Math.pow(triangle[i][2],2)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			case 1:
				if(Math.pow(triangle[i][1],2) == Math.pow(triangle[i][0],2) + Math.pow(triangle[i][2],2)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			case 2:
				if(Math.pow(triangle[i][2],2) == Math.pow(triangle[i][0],2) + Math.pow(triangle[i][1],2)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			}

		}
	} InputStreamReader is = new InputStreamReader(System.in); is new InputStreamReader(System.in) BufferedReader br = new BufferedReader(is); br new BufferedReader(is) String col = "0"; col "0" String[] cols = null; cols null int colInt = 0; colInt 0 try {
			col = br.readLine();
			colInt = Integer.parseInt(col);
			cols = new String[colInt];

			for(int i = 0;i < colInt;i++){
				cols[i] = br.readLine();
			}
		}catch(IOException e){

		} catch(IOException e){

		} IOException e {

		} {
			col = br.readLine();
			colInt = Integer.parseInt(col);
			cols = new String[colInt];

			for(int i = 0;i < colInt;i++){
				cols[i] = br.readLine();
			}
		} col = br.readLine() col br.readLine() br.readLine br colInt = Integer.parseInt(col) colInt Integer.parseInt(col) Integer.parseInt Integer col cols = new String[colInt] cols new String[colInt] colInt for(int i = 0;i < colInt;i++){
				cols[i] = br.readLine();
			} int i = 0; int i = 0; i 0 i < colInt i colInt i++ i++ i {
				cols[i] = br.readLine();
			} {
				cols[i] = br.readLine();
			} cols[i] = br.readLine() cols[i] cols i br.readLine() br.readLine br int[][] triangle = new int[colInt][3]; triangle new int[colInt][3] colInt 3 for(int i = 0;i < colInt;i++){
			String[] temp = cols[i].split(" ");
			triangle[i][0] = Integer.parseInt(temp[0]);
			triangle[i][1] = Integer.parseInt(temp[1]);
			triangle[i][2] = Integer.parseInt(temp[2]);
		} int i = 0; int i = 0; i 0 i < colInt i colInt i++ i++ i {
			String[] temp = cols[i].split(" ");
			triangle[i][0] = Integer.parseInt(temp[0]);
			triangle[i][1] = Integer.parseInt(temp[1]);
			triangle[i][2] = Integer.parseInt(temp[2]);
		} {
			String[] temp = cols[i].split(" ");
			triangle[i][0] = Integer.parseInt(temp[0]);
			triangle[i][1] = Integer.parseInt(temp[1]);
			triangle[i][2] = Integer.parseInt(temp[2]);
		} String[] temp = cols[i].split(" "); temp cols[i].split(" ") cols[i].split cols[i] cols i " " triangle[i][0] = Integer.parseInt(temp[0]) triangle[i][0] triangle[i] triangle i 0 Integer.parseInt(temp[0]) Integer.parseInt Integer temp[0] temp 0 triangle[i][1] = Integer.parseInt(temp[1]) triangle[i][1] triangle[i] triangle i 1 Integer.parseInt(temp[1]) Integer.parseInt Integer temp[1] temp 1 triangle[i][2] = Integer.parseInt(temp[2]) triangle[i][2] triangle[i] triangle i 2 Integer.parseInt(temp[2]) Integer.parseInt Integer temp[2] temp 2 for(int i = 0;i < colInt;i++){
			//三角形ごとに、最長の辺を求める
			int maxIndex = 0;
			if(triangle[i][maxIndex] < triangle[i][1]){
				maxIndex = 1;
			}
			if(triangle[i][maxIndex] < triangle[i][2]){
				maxIndex = 2;
			}
			//三角形が直角三角形であるかを求める
			switch (maxIndex){
			case 0:
				if(Math.pow(triangle[i][0],2) == Math.pow(triangle[i][1],2) + Math.pow(triangle[i][2],2)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			case 1:
				if(Math.pow(triangle[i][1],2) == Math.pow(triangle[i][0],2) + Math.pow(triangle[i][2],2)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			case 2:
				if(Math.pow(triangle[i][2],2) == Math.pow(triangle[i][0],2) + Math.pow(triangle[i][1],2)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			}

		} int i = 0; int i = 0; i 0 i < colInt i colInt i++ i++ i {
			//三角形ごとに、最長の辺を求める
			int maxIndex = 0;
			if(triangle[i][maxIndex] < triangle[i][1]){
				maxIndex = 1;
			}
			if(triangle[i][maxIndex] < triangle[i][2]){
				maxIndex = 2;
			}
			//三角形が直角三角形であるかを求める
			switch (maxIndex){
			case 0:
				if(Math.pow(triangle[i][0],2) == Math.pow(triangle[i][1],2) + Math.pow(triangle[i][2],2)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			case 1:
				if(Math.pow(triangle[i][1],2) == Math.pow(triangle[i][0],2) + Math.pow(triangle[i][2],2)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			case 2:
				if(Math.pow(triangle[i][2],2) == Math.pow(triangle[i][0],2) + Math.pow(triangle[i][1],2)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			}

		} {
			//三角形ごとに、最長の辺を求める
			int maxIndex = 0;
			if(triangle[i][maxIndex] < triangle[i][1]){
				maxIndex = 1;
			}
			if(triangle[i][maxIndex] < triangle[i][2]){
				maxIndex = 2;
			}
			//三角形が直角三角形であるかを求める
			switch (maxIndex){
			case 0:
				if(Math.pow(triangle[i][0],2) == Math.pow(triangle[i][1],2) + Math.pow(triangle[i][2],2)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			case 1:
				if(Math.pow(triangle[i][1],2) == Math.pow(triangle[i][0],2) + Math.pow(triangle[i][2],2)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			case 2:
				if(Math.pow(triangle[i][2],2) == Math.pow(triangle[i][0],2) + Math.pow(triangle[i][1],2)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			}

		} int maxIndex = 0; maxIndex 0 if(triangle[i][maxIndex] < triangle[i][1]){
				maxIndex = 1;
			} triangle[i][maxIndex] < triangle[i][1] triangle[i][maxIndex] triangle[i] triangle i maxIndex triangle[i][1] triangle[i] triangle i 1 {
				maxIndex = 1;
			} maxIndex = 1 maxIndex 1 if(triangle[i][maxIndex] < triangle[i][2]){
				maxIndex = 2;
			} triangle[i][maxIndex] < triangle[i][2] triangle[i][maxIndex] triangle[i] triangle i maxIndex triangle[i][2] triangle[i] triangle i 2 {
				maxIndex = 2;
			} maxIndex = 2 maxIndex 2 switch (maxIndex){
			case 0:
				if(Math.pow(triangle[i][0],2) == Math.pow(triangle[i][1],2) + Math.pow(triangle[i][2],2)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			case 1:
				if(Math.pow(triangle[i][1],2) == Math.pow(triangle[i][0],2) + Math.pow(triangle[i][2],2)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			case 2:
				if(Math.pow(triangle[i][2],2) == Math.pow(triangle[i][0],2) + Math.pow(triangle[i][1],2)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			} maxIndex case 0: 0 case 0: if(Math.pow(triangle[i][0],2) == Math.pow(triangle[i][1],2) + Math.pow(triangle[i][2],2)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				} Math.pow(triangle[i][0],2) == Math.pow(triangle[i][1],2) + Math.pow(triangle[i][2],2) Math.pow(triangle[i][0],2) Math.pow Math triangle[i][0] triangle[i] triangle i 0 2 Math.pow(triangle[i][1],2) + Math.pow(triangle[i][2],2) Math.pow(triangle[i][1],2) Math.pow Math triangle[i][1] triangle[i] triangle i 1 2 Math.pow(triangle[i][2],2) Math.pow Math triangle[i][2] triangle[i] triangle i 2 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" break; case 1: 1 case 1: if(Math.pow(triangle[i][1],2) == Math.pow(triangle[i][0],2) + Math.pow(triangle[i][2],2)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				} Math.pow(triangle[i][1],2) == Math.pow(triangle[i][0],2) + Math.pow(triangle[i][2],2) Math.pow(triangle[i][1],2) Math.pow Math triangle[i][1] triangle[i] triangle i 1 2 Math.pow(triangle[i][0],2) + Math.pow(triangle[i][2],2) Math.pow(triangle[i][0],2) Math.pow Math triangle[i][0] triangle[i] triangle i 0 2 Math.pow(triangle[i][2],2) Math.pow Math triangle[i][2] triangle[i] triangle i 2 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" break; case 2: 2 case 2: if(Math.pow(triangle[i][2],2) == Math.pow(triangle[i][0],2) + Math.pow(triangle[i][1],2)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				} Math.pow(triangle[i][2],2) == Math.pow(triangle[i][0],2) + Math.pow(triangle[i][1],2) Math.pow(triangle[i][2],2) Math.pow Math triangle[i][2] triangle[i] triangle i 2 2 Math.pow(triangle[i][0],2) + Math.pow(triangle[i][1],2) Math.pow(triangle[i][0],2) Math.pow Math triangle[i][0] triangle[i] triangle i 0 2 Math.pow(triangle[i][1],2) Math.pow Math triangle[i][1] triangle[i] triangle i 1 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" break; String[] args args public class Main {

	public static void main(String[] args) {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);

		String col = "0";	//入力する行数
		String[] cols = null;
		int colInt = 0;

		//行数の入力後、三角形の三辺の長さを入力
		try {
			col = br.readLine();
			colInt = Integer.parseInt(col);
			cols = new String[colInt];

			for(int i = 0;i < colInt;i++){
				cols[i] = br.readLine();
			}
		}catch(IOException e){

		}

		//値の分離
		int[][] triangle = new int[colInt][3];
		for(int i = 0;i < colInt;i++){
			String[] temp = cols[i].split(" ");
			triangle[i][0] = Integer.parseInt(temp[0]);
			triangle[i][1] = Integer.parseInt(temp[1]);
			triangle[i][2] = Integer.parseInt(temp[2]);
		}
		for(int i = 0;i < colInt;i++){
			//三角形ごとに、最長の辺を求める
			int maxIndex = 0;
			if(triangle[i][maxIndex] < triangle[i][1]){
				maxIndex = 1;
			}
			if(triangle[i][maxIndex] < triangle[i][2]){
				maxIndex = 2;
			}
			//三角形が直角三角形であるかを求める
			switch (maxIndex){
			case 0:
				if(Math.pow(triangle[i][0],2) == Math.pow(triangle[i][1],2) + Math.pow(triangle[i][2],2)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			case 1:
				if(Math.pow(triangle[i][1],2) == Math.pow(triangle[i][0],2) + Math.pow(triangle[i][2],2)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			case 2:
				if(Math.pow(triangle[i][2],2) == Math.pow(triangle[i][0],2) + Math.pow(triangle[i][1],2)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			}

		}
	}
} public class Main {

	public static void main(String[] args) {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);

		String col = "0";	//入力する行数
		String[] cols = null;
		int colInt = 0;

		//行数の入力後、三角形の三辺の長さを入力
		try {
			col = br.readLine();
			colInt = Integer.parseInt(col);
			cols = new String[colInt];

			for(int i = 0;i < colInt;i++){
				cols[i] = br.readLine();
			}
		}catch(IOException e){

		}

		//値の分離
		int[][] triangle = new int[colInt][3];
		for(int i = 0;i < colInt;i++){
			String[] temp = cols[i].split(" ");
			triangle[i][0] = Integer.parseInt(temp[0]);
			triangle[i][1] = Integer.parseInt(temp[1]);
			triangle[i][2] = Integer.parseInt(temp[2]);
		}
		for(int i = 0;i < colInt;i++){
			//三角形ごとに、最長の辺を求める
			int maxIndex = 0;
			if(triangle[i][maxIndex] < triangle[i][1]){
				maxIndex = 1;
			}
			if(triangle[i][maxIndex] < triangle[i][2]){
				maxIndex = 2;
			}
			//三角形が直角三角形であるかを求める
			switch (maxIndex){
			case 0:
				if(Math.pow(triangle[i][0],2) == Math.pow(triangle[i][1],2) + Math.pow(triangle[i][2],2)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			case 1:
				if(Math.pow(triangle[i][1],2) == Math.pow(triangle[i][0],2) + Math.pow(triangle[i][2],2)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			case 2:
				if(Math.pow(triangle[i][2],2) == Math.pow(triangle[i][0],2) + Math.pow(triangle[i][1],2)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			}

		}
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.lang.Math;
public class Main {

	public static void main(String[] args) {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);

		String col = "0";	//入力する行数
		String[] cols = null;
		int colInt = 0;

		//行数の入力後、三角形の三辺の長さを入力
		try {
			col = br.readLine();
			colInt = Integer.parseInt(col);
			cols = new String[colInt];

			for(int i = 0;i < colInt;i++){
				cols[i] = br.readLine();
			}
		}catch(IOException e){

		}

		//値の分離
		int[][] triangle = new int[colInt][3];
		for(int i = 0;i < colInt;i++){
			String[] temp = cols[i].split(" ");
			triangle[i][0] = Integer.parseInt(temp[0]);
			triangle[i][1] = Integer.parseInt(temp[1]);
			triangle[i][2] = Integer.parseInt(temp[2]);
		}
		for(int i = 0;i < colInt;i++){
			//三角形ごとに、最長の辺を求める
			int maxIndex = 0;
			if(triangle[i][maxIndex] < triangle[i][1]){
				maxIndex = 1;
			}
			if(triangle[i][maxIndex] < triangle[i][2]){
				maxIndex = 2;
			}
			//三角形が直角三角形であるかを求める
			switch (maxIndex){
			case 0:
				if(Math.pow(triangle[i][0],2) == Math.pow(triangle[i][1],2) + Math.pow(triangle[i][2],2)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			case 1:
				if(Math.pow(triangle[i][1],2) == Math.pow(triangle[i][0],2) + Math.pow(triangle[i][2],2)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			case 2:
				if(Math.pow(triangle[i][2],2) == Math.pow(triangle[i][0],2) + Math.pow(triangle[i][1],2)){
					System.out.println("YES");
				}else{
					System.out.println("NO");
				}
				break;
			}

		}
	}
}