import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
			//?????????????????????

	    Scanner scan = new Scanner(System.in);
	    String gyosu = scan.next();
	 	int intgyosu = Integer.parseInt(gyosu);
	 	String[] yesno;
	 	yesno = new String[intgyosu];

	  for(int i = 1; i<=intgyosu; i++){

	    String num1 = scan.next();
	 	int int1 = Integer.parseInt(num1);

	    String num2 = scan.next();
	    int int2 = Integer.parseInt(num2);

	    String num3 = scan.next();
	    int int3= Integer.parseInt(num3);

	    int maxnum = Math.max(int1, int2);
	    int max_num = Math.max(maxnum, int3);

	    boolean hantei = false;

		if(max_num==int1){
	    	hantei =  (int2 * int2) + (int3 * int3) == (int1*int1);
	    }else if(max_num==int2) {
	    	hantei =  (int1 * int1) + (int3 * int3) == (int2*int2);
	    }else if (max_num==int3){
	    	hantei =  (int2 * int2) + (int1 * int1) == (int3*int3);
	    }

		if(hantei){
			 yesno[i-1] = "YES";
		}else{
			yesno[i-1] = "NO";
		}
	  }

	  //????????????
	    scan.close();

	    for(int j =0; j<intgyosu; j++){
	    		System.out.println(yesno[j]);

	}

	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
			//?????????????????????

	    Scanner scan = new Scanner(System.in);
	    String gyosu = scan.next();
	 	int intgyosu = Integer.parseInt(gyosu);
	 	String[] yesno;
	 	yesno = new String[intgyosu];

	  for(int i = 1; i<=intgyosu; i++){

	    String num1 = scan.next();
	 	int int1 = Integer.parseInt(num1);

	    String num2 = scan.next();
	    int int2 = Integer.parseInt(num2);

	    String num3 = scan.next();
	    int int3= Integer.parseInt(num3);

	    int maxnum = Math.max(int1, int2);
	    int max_num = Math.max(maxnum, int3);

	    boolean hantei = false;

		if(max_num==int1){
	    	hantei =  (int2 * int2) + (int3 * int3) == (int1*int1);
	    }else if(max_num==int2) {
	    	hantei =  (int1 * int1) + (int3 * int3) == (int2*int2);
	    }else if (max_num==int3){
	    	hantei =  (int2 * int2) + (int1 * int1) == (int3*int3);
	    }

		if(hantei){
			 yesno[i-1] = "YES";
		}else{
			yesno[i-1] = "NO";
		}
	  }

	  //????????????
	    scan.close();

	    for(int j =0; j<intgyosu; j++){
	    		System.out.println(yesno[j]);

	}

	}
} Main public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
			//?????????????????????

	    Scanner scan = new Scanner(System.in);
	    String gyosu = scan.next();
	 	int intgyosu = Integer.parseInt(gyosu);
	 	String[] yesno;
	 	yesno = new String[intgyosu];

	  for(int i = 1; i<=intgyosu; i++){

	    String num1 = scan.next();
	 	int int1 = Integer.parseInt(num1);

	    String num2 = scan.next();
	    int int2 = Integer.parseInt(num2);

	    String num3 = scan.next();
	    int int3= Integer.parseInt(num3);

	    int maxnum = Math.max(int1, int2);
	    int max_num = Math.max(maxnum, int3);

	    boolean hantei = false;

		if(max_num==int1){
	    	hantei =  (int2 * int2) + (int3 * int3) == (int1*int1);
	    }else if(max_num==int2) {
	    	hantei =  (int1 * int1) + (int3 * int3) == (int2*int2);
	    }else if (max_num==int3){
	    	hantei =  (int2 * int2) + (int1 * int1) == (int3*int3);
	    }

		if(hantei){
			 yesno[i-1] = "YES";
		}else{
			yesno[i-1] = "NO";
		}
	  }

	  //????????????
	    scan.close();

	    for(int j =0; j<intgyosu; j++){
	    		System.out.println(yesno[j]);

	}

	} main {
		// TODO ?????????????????????????????????????????????
			//?????????????????????

	    Scanner scan = new Scanner(System.in);
	    String gyosu = scan.next();
	 	int intgyosu = Integer.parseInt(gyosu);
	 	String[] yesno;
	 	yesno = new String[intgyosu];

	  for(int i = 1; i<=intgyosu; i++){

	    String num1 = scan.next();
	 	int int1 = Integer.parseInt(num1);

	    String num2 = scan.next();
	    int int2 = Integer.parseInt(num2);

	    String num3 = scan.next();
	    int int3= Integer.parseInt(num3);

	    int maxnum = Math.max(int1, int2);
	    int max_num = Math.max(maxnum, int3);

	    boolean hantei = false;

		if(max_num==int1){
	    	hantei =  (int2 * int2) + (int3 * int3) == (int1*int1);
	    }else if(max_num==int2) {
	    	hantei =  (int1 * int1) + (int3 * int3) == (int2*int2);
	    }else if (max_num==int3){
	    	hantei =  (int2 * int2) + (int1 * int1) == (int3*int3);
	    }

		if(hantei){
			 yesno[i-1] = "YES";
		}else{
			yesno[i-1] = "NO";
		}
	  }

	  //????????????
	    scan.close();

	    for(int j =0; j<intgyosu; j++){
	    		System.out.println(yesno[j]);

	}

	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String gyosu = scan.next(); gyosu scan.next() scan.next scan int intgyosu = Integer.parseInt(gyosu); intgyosu Integer.parseInt(gyosu) Integer.parseInt Integer gyosu String[] yesno; yesno yesno = new String[intgyosu] yesno new String[intgyosu] intgyosu for(int i = 1; i<=intgyosu; i++){

	    String num1 = scan.next();
	 	int int1 = Integer.parseInt(num1);

	    String num2 = scan.next();
	    int int2 = Integer.parseInt(num2);

	    String num3 = scan.next();
	    int int3= Integer.parseInt(num3);

	    int maxnum = Math.max(int1, int2);
	    int max_num = Math.max(maxnum, int3);

	    boolean hantei = false;

		if(max_num==int1){
	    	hantei =  (int2 * int2) + (int3 * int3) == (int1*int1);
	    }else if(max_num==int2) {
	    	hantei =  (int1 * int1) + (int3 * int3) == (int2*int2);
	    }else if (max_num==int3){
	    	hantei =  (int2 * int2) + (int1 * int1) == (int3*int3);
	    }

		if(hantei){
			 yesno[i-1] = "YES";
		}else{
			yesno[i-1] = "NO";
		}
	  } int i = 1; int i = 1; i 1 i<=intgyosu i intgyosu i++ i++ i {

	    String num1 = scan.next();
	 	int int1 = Integer.parseInt(num1);

	    String num2 = scan.next();
	    int int2 = Integer.parseInt(num2);

	    String num3 = scan.next();
	    int int3= Integer.parseInt(num3);

	    int maxnum = Math.max(int1, int2);
	    int max_num = Math.max(maxnum, int3);

	    boolean hantei = false;

		if(max_num==int1){
	    	hantei =  (int2 * int2) + (int3 * int3) == (int1*int1);
	    }else if(max_num==int2) {
	    	hantei =  (int1 * int1) + (int3 * int3) == (int2*int2);
	    }else if (max_num==int3){
	    	hantei =  (int2 * int2) + (int1 * int1) == (int3*int3);
	    }

		if(hantei){
			 yesno[i-1] = "YES";
		}else{
			yesno[i-1] = "NO";
		}
	  } {

	    String num1 = scan.next();
	 	int int1 = Integer.parseInt(num1);

	    String num2 = scan.next();
	    int int2 = Integer.parseInt(num2);

	    String num3 = scan.next();
	    int int3= Integer.parseInt(num3);

	    int maxnum = Math.max(int1, int2);
	    int max_num = Math.max(maxnum, int3);

	    boolean hantei = false;

		if(max_num==int1){
	    	hantei =  (int2 * int2) + (int3 * int3) == (int1*int1);
	    }else if(max_num==int2) {
	    	hantei =  (int1 * int1) + (int3 * int3) == (int2*int2);
	    }else if (max_num==int3){
	    	hantei =  (int2 * int2) + (int1 * int1) == (int3*int3);
	    }

		if(hantei){
			 yesno[i-1] = "YES";
		}else{
			yesno[i-1] = "NO";
		}
	  } String num1 = scan.next(); num1 scan.next() scan.next scan int int1 = Integer.parseInt(num1); int1 Integer.parseInt(num1) Integer.parseInt Integer num1 String num2 = scan.next(); num2 scan.next() scan.next scan int int2 = Integer.parseInt(num2); int2 Integer.parseInt(num2) Integer.parseInt Integer num2 String num3 = scan.next(); num3 scan.next() scan.next scan int int3= Integer.parseInt(num3); int3 Integer.parseInt(num3) Integer.parseInt Integer num3 int maxnum = Math.max(int1, int2); maxnum Math.max(int1, int2) Math.max Math int1 int2 int max_num = Math.max(maxnum, int3); max_num Math.max(maxnum, int3) Math.max Math maxnum int3 boolean hantei = false; hantei false if(max_num==int1){
	    	hantei =  (int2 * int2) + (int3 * int3) == (int1*int1);
	    }else if(max_num==int2) {
	    	hantei =  (int1 * int1) + (int3 * int3) == (int2*int2);
	    }else if (max_num==int3){
	    	hantei =  (int2 * int2) + (int1 * int1) == (int3*int3);
	    } max_num==int1 max_num int1 {
	    	hantei =  (int2 * int2) + (int3 * int3) == (int1*int1);
	    } hantei =  (int2 * int2) + (int3 * int3) == (int1*int1) hantei (int2 * int2) + (int3 * int3) == (int1*int1) (int2 * int2) + (int3 * int3) (int2 * int2) int2 int2 (int3 * int3) int3 int3 (int1*int1) int1 int1 if(max_num==int2) {
	    	hantei =  (int1 * int1) + (int3 * int3) == (int2*int2);
	    }else if (max_num==int3){
	    	hantei =  (int2 * int2) + (int1 * int1) == (int3*int3);
	    } max_num==int2 max_num int2 {
	    	hantei =  (int1 * int1) + (int3 * int3) == (int2*int2);
	    } hantei =  (int1 * int1) + (int3 * int3) == (int2*int2) hantei (int1 * int1) + (int3 * int3) == (int2*int2) (int1 * int1) + (int3 * int3) (int1 * int1) int1 int1 (int3 * int3) int3 int3 (int2*int2) int2 int2 if (max_num==int3){
	    	hantei =  (int2 * int2) + (int1 * int1) == (int3*int3);
	    } max_num==int3 max_num int3 {
	    	hantei =  (int2 * int2) + (int1 * int1) == (int3*int3);
	    } hantei =  (int2 * int2) + (int1 * int1) == (int3*int3) hantei (int2 * int2) + (int1 * int1) == (int3*int3) (int2 * int2) + (int1 * int1) (int2 * int2) int2 int2 (int1 * int1) int1 int1 (int3*int3) int3 int3 if(hantei){
			 yesno[i-1] = "YES";
		}else{
			yesno[i-1] = "NO";
		} hantei {
			 yesno[i-1] = "YES";
		} yesno[i-1] = "YES" yesno[i-1] yesno i-1 i 1 "YES" {
			yesno[i-1] = "NO";
		} yesno[i-1] = "NO" yesno[i-1] yesno i-1 i 1 "NO" scan.close() scan.close scan for(int j =0; j<intgyosu; j++){
	    		System.out.println(yesno[j]);

	} int j =0; int j =0; j 0 j<intgyosu j intgyosu j++ j++ j {
	    		System.out.println(yesno[j]);

	} {
	    		System.out.println(yesno[j]);

	} System.out.println(yesno[j]) System.out.println System.out System System.out yesno[j] yesno j String[] args args public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
			//?????????????????????

	    Scanner scan = new Scanner(System.in);
	    String gyosu = scan.next();
	 	int intgyosu = Integer.parseInt(gyosu);
	 	String[] yesno;
	 	yesno = new String[intgyosu];

	  for(int i = 1; i<=intgyosu; i++){

	    String num1 = scan.next();
	 	int int1 = Integer.parseInt(num1);

	    String num2 = scan.next();
	    int int2 = Integer.parseInt(num2);

	    String num3 = scan.next();
	    int int3= Integer.parseInt(num3);

	    int maxnum = Math.max(int1, int2);
	    int max_num = Math.max(maxnum, int3);

	    boolean hantei = false;

		if(max_num==int1){
	    	hantei =  (int2 * int2) + (int3 * int3) == (int1*int1);
	    }else if(max_num==int2) {
	    	hantei =  (int1 * int1) + (int3 * int3) == (int2*int2);
	    }else if (max_num==int3){
	    	hantei =  (int2 * int2) + (int1 * int1) == (int3*int3);
	    }

		if(hantei){
			 yesno[i-1] = "YES";
		}else{
			yesno[i-1] = "NO";
		}
	  }

	  //????????????
	    scan.close();

	    for(int j =0; j<intgyosu; j++){
	    		System.out.println(yesno[j]);

	}

	}
} public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
			//?????????????????????

	    Scanner scan = new Scanner(System.in);
	    String gyosu = scan.next();
	 	int intgyosu = Integer.parseInt(gyosu);
	 	String[] yesno;
	 	yesno = new String[intgyosu];

	  for(int i = 1; i<=intgyosu; i++){

	    String num1 = scan.next();
	 	int int1 = Integer.parseInt(num1);

	    String num2 = scan.next();
	    int int2 = Integer.parseInt(num2);

	    String num3 = scan.next();
	    int int3= Integer.parseInt(num3);

	    int maxnum = Math.max(int1, int2);
	    int max_num = Math.max(maxnum, int3);

	    boolean hantei = false;

		if(max_num==int1){
	    	hantei =  (int2 * int2) + (int3 * int3) == (int1*int1);
	    }else if(max_num==int2) {
	    	hantei =  (int1 * int1) + (int3 * int3) == (int2*int2);
	    }else if (max_num==int3){
	    	hantei =  (int2 * int2) + (int1 * int1) == (int3*int3);
	    }

		if(hantei){
			 yesno[i-1] = "YES";
		}else{
			yesno[i-1] = "NO";
		}
	  }

	  //????????????
	    scan.close();

	    for(int j =0; j<intgyosu; j++){
	    		System.out.println(yesno[j]);

	}

	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
			//?????????????????????

	    Scanner scan = new Scanner(System.in);
	    String gyosu = scan.next();
	 	int intgyosu = Integer.parseInt(gyosu);
	 	String[] yesno;
	 	yesno = new String[intgyosu];

	  for(int i = 1; i<=intgyosu; i++){

	    String num1 = scan.next();
	 	int int1 = Integer.parseInt(num1);

	    String num2 = scan.next();
	    int int2 = Integer.parseInt(num2);

	    String num3 = scan.next();
	    int int3= Integer.parseInt(num3);

	    int maxnum = Math.max(int1, int2);
	    int max_num = Math.max(maxnum, int3);

	    boolean hantei = false;

		if(max_num==int1){
	    	hantei =  (int2 * int2) + (int3 * int3) == (int1*int1);
	    }else if(max_num==int2) {
	    	hantei =  (int1 * int1) + (int3 * int3) == (int2*int2);
	    }else if (max_num==int3){
	    	hantei =  (int2 * int2) + (int1 * int1) == (int3*int3);
	    }

		if(hantei){
			 yesno[i-1] = "YES";
		}else{
			yesno[i-1] = "NO";
		}
	  }

	  //????????????
	    scan.close();

	    for(int j =0; j<intgyosu; j++){
	    		System.out.println(yesno[j]);

	}

	}
}