import java.util.Scanner;
 
public class Main {
  public static void main(String[] args){
	Scanner s = new Scanner(System.in);
	int a , b , c , max_num1, max_num2;
	int res_flg;
	//String n = s.next();
	int n = Integer.parseInt(s.nextLine());
	for(int i = 0;i<n;i++){
		String line = s.nextLine();
		String[] array = line.split(" ",0);
		a = Integer.parseInt(array[0]);
		b = Integer.parseInt(array[1]);
		c = Integer.parseInt(array[2]);
 
		if(a >= b && a >= c){
			if(a*a == b*b+c*c){
				res_flg = 1;
			}else{
				res_flg = 0;
			}
		}
		else if(b >= a && b >= c){
			if(b*b == a*a+c*c){
				res_flg = 1;
			}else{
				res_flg = 0;
			}
		}
		else if(c >= a && c >= b){
			if(c*c == b*b+a*a){
				res_flg = 1;
			}else{
				res_flg = 0;
			}
		}else{
			res_flg = 0;
		}
		if(res_flg == 0){
			System.out.println("NO");
		}else{
			System.out.println("YES");
		}
	}
  }
} import java.util.Scanner; Scanner java.util public class Main {
  public static void main(String[] args){
	Scanner s = new Scanner(System.in);
	int a , b , c , max_num1, max_num2;
	int res_flg;
	//String n = s.next();
	int n = Integer.parseInt(s.nextLine());
	for(int i = 0;i<n;i++){
		String line = s.nextLine();
		String[] array = line.split(" ",0);
		a = Integer.parseInt(array[0]);
		b = Integer.parseInt(array[1]);
		c = Integer.parseInt(array[2]);
 
		if(a >= b && a >= c){
			if(a*a == b*b+c*c){
				res_flg = 1;
			}else{
				res_flg = 0;
			}
		}
		else if(b >= a && b >= c){
			if(b*b == a*a+c*c){
				res_flg = 1;
			}else{
				res_flg = 0;
			}
		}
		else if(c >= a && c >= b){
			if(c*c == b*b+a*a){
				res_flg = 1;
			}else{
				res_flg = 0;
			}
		}else{
			res_flg = 0;
		}
		if(res_flg == 0){
			System.out.println("NO");
		}else{
			System.out.println("YES");
		}
	}
  }
} Main public static void main(String[] args){
	Scanner s = new Scanner(System.in);
	int a , b , c , max_num1, max_num2;
	int res_flg;
	//String n = s.next();
	int n = Integer.parseInt(s.nextLine());
	for(int i = 0;i<n;i++){
		String line = s.nextLine();
		String[] array = line.split(" ",0);
		a = Integer.parseInt(array[0]);
		b = Integer.parseInt(array[1]);
		c = Integer.parseInt(array[2]);
 
		if(a >= b && a >= c){
			if(a*a == b*b+c*c){
				res_flg = 1;
			}else{
				res_flg = 0;
			}
		}
		else if(b >= a && b >= c){
			if(b*b == a*a+c*c){
				res_flg = 1;
			}else{
				res_flg = 0;
			}
		}
		else if(c >= a && c >= b){
			if(c*c == b*b+a*a){
				res_flg = 1;
			}else{
				res_flg = 0;
			}
		}else{
			res_flg = 0;
		}
		if(res_flg == 0){
			System.out.println("NO");
		}else{
			System.out.println("YES");
		}
	}
  } main {
	Scanner s = new Scanner(System.in);
	int a , b , c , max_num1, max_num2;
	int res_flg;
	//String n = s.next();
	int n = Integer.parseInt(s.nextLine());
	for(int i = 0;i<n;i++){
		String line = s.nextLine();
		String[] array = line.split(" ",0);
		a = Integer.parseInt(array[0]);
		b = Integer.parseInt(array[1]);
		c = Integer.parseInt(array[2]);
 
		if(a >= b && a >= c){
			if(a*a == b*b+c*c){
				res_flg = 1;
			}else{
				res_flg = 0;
			}
		}
		else if(b >= a && b >= c){
			if(b*b == a*a+c*c){
				res_flg = 1;
			}else{
				res_flg = 0;
			}
		}
		else if(c >= a && c >= b){
			if(c*c == b*b+a*a){
				res_flg = 1;
			}else{
				res_flg = 0;
			}
		}else{
			res_flg = 0;
		}
		if(res_flg == 0){
			System.out.println("NO");
		}else{
			System.out.println("YES");
		}
	}
  } Scanner s = new Scanner(System.in); s new Scanner(System.in) int a a b b c c max_num1 max_num1 max_num2; max_num2 int res_flg; res_flg int n = Integer.parseInt(s.nextLine()); n Integer.parseInt(s.nextLine()) Integer.parseInt Integer s.nextLine() s.nextLine s for(int i = 0;i<n;i++){
		String line = s.nextLine();
		String[] array = line.split(" ",0);
		a = Integer.parseInt(array[0]);
		b = Integer.parseInt(array[1]);
		c = Integer.parseInt(array[2]);
 
		if(a >= b && a >= c){
			if(a*a == b*b+c*c){
				res_flg = 1;
			}else{
				res_flg = 0;
			}
		}
		else if(b >= a && b >= c){
			if(b*b == a*a+c*c){
				res_flg = 1;
			}else{
				res_flg = 0;
			}
		}
		else if(c >= a && c >= b){
			if(c*c == b*b+a*a){
				res_flg = 1;
			}else{
				res_flg = 0;
			}
		}else{
			res_flg = 0;
		}
		if(res_flg == 0){
			System.out.println("NO");
		}else{
			System.out.println("YES");
		}
	} int i = 0; int i = 0; i 0 i<n i n i++ i++ i {
		String line = s.nextLine();
		String[] array = line.split(" ",0);
		a = Integer.parseInt(array[0]);
		b = Integer.parseInt(array[1]);
		c = Integer.parseInt(array[2]);
 
		if(a >= b && a >= c){
			if(a*a == b*b+c*c){
				res_flg = 1;
			}else{
				res_flg = 0;
			}
		}
		else if(b >= a && b >= c){
			if(b*b == a*a+c*c){
				res_flg = 1;
			}else{
				res_flg = 0;
			}
		}
		else if(c >= a && c >= b){
			if(c*c == b*b+a*a){
				res_flg = 1;
			}else{
				res_flg = 0;
			}
		}else{
			res_flg = 0;
		}
		if(res_flg == 0){
			System.out.println("NO");
		}else{
			System.out.println("YES");
		}
	} {
		String line = s.nextLine();
		String[] array = line.split(" ",0);
		a = Integer.parseInt(array[0]);
		b = Integer.parseInt(array[1]);
		c = Integer.parseInt(array[2]);
 
		if(a >= b && a >= c){
			if(a*a == b*b+c*c){
				res_flg = 1;
			}else{
				res_flg = 0;
			}
		}
		else if(b >= a && b >= c){
			if(b*b == a*a+c*c){
				res_flg = 1;
			}else{
				res_flg = 0;
			}
		}
		else if(c >= a && c >= b){
			if(c*c == b*b+a*a){
				res_flg = 1;
			}else{
				res_flg = 0;
			}
		}else{
			res_flg = 0;
		}
		if(res_flg == 0){
			System.out.println("NO");
		}else{
			System.out.println("YES");
		}
	} String line = s.nextLine(); line s.nextLine() s.nextLine s String[] array = line.split(" ",0); array line.split(" ",0) line.split line " " 0 a = Integer.parseInt(array[0]) a Integer.parseInt(array[0]) Integer.parseInt Integer array[0] array 0 b = Integer.parseInt(array[1]) b Integer.parseInt(array[1]) Integer.parseInt Integer array[1] array 1 c = Integer.parseInt(array[2]) c Integer.parseInt(array[2]) Integer.parseInt Integer array[2] array 2 if(a >= b && a >= c){
			if(a*a == b*b+c*c){
				res_flg = 1;
			}else{
				res_flg = 0;
			}
		}
		else if(b >= a && b >= c){
			if(b*b == a*a+c*c){
				res_flg = 1;
			}else{
				res_flg = 0;
			}
		}
		else if(c >= a && c >= b){
			if(c*c == b*b+a*a){
				res_flg = 1;
			}else{
				res_flg = 0;
			}
		}else{
			res_flg = 0;
		} a >= b && a >= c a >= b a b a >= c a c {
			if(a*a == b*b+c*c){
				res_flg = 1;
			}else{
				res_flg = 0;
			}
		} if(a*a == b*b+c*c){
				res_flg = 1;
			}else{
				res_flg = 0;
			} a*a == b*b+c*c a*a a a b*b+c*c b*b b b c*c c c {
				res_flg = 1;
			} res_flg = 1 res_flg 1 {
				res_flg = 0;
			} res_flg = 0 res_flg 0 if(b >= a && b >= c){
			if(b*b == a*a+c*c){
				res_flg = 1;
			}else{
				res_flg = 0;
			}
		}
		else if(c >= a && c >= b){
			if(c*c == b*b+a*a){
				res_flg = 1;
			}else{
				res_flg = 0;
			}
		}else{
			res_flg = 0;
		} b >= a && b >= c b >= a b a b >= c b c {
			if(b*b == a*a+c*c){
				res_flg = 1;
			}else{
				res_flg = 0;
			}
		} if(b*b == a*a+c*c){
				res_flg = 1;
			}else{
				res_flg = 0;
			} b*b == a*a+c*c b*b b b a*a+c*c a*a a a c*c c c {
				res_flg = 1;
			} res_flg = 1 res_flg 1 {
				res_flg = 0;
			} res_flg = 0 res_flg 0 if(c >= a && c >= b){
			if(c*c == b*b+a*a){
				res_flg = 1;
			}else{
				res_flg = 0;
			}
		}else{
			res_flg = 0;
		} c >= a && c >= b c >= a c a c >= b c b {
			if(c*c == b*b+a*a){
				res_flg = 1;
			}else{
				res_flg = 0;
			}
		} if(c*c == b*b+a*a){
				res_flg = 1;
			}else{
				res_flg = 0;
			} c*c == b*b+a*a c*c c c b*b+a*a b*b b b a*a a a {
				res_flg = 1;
			} res_flg = 1 res_flg 1 {
				res_flg = 0;
			} res_flg = 0 res_flg 0 {
			res_flg = 0;
		} res_flg = 0 res_flg 0 if(res_flg == 0){
			System.out.println("NO");
		}else{
			System.out.println("YES");
		} res_flg == 0 res_flg 0 {
			System.out.println("NO");
		} System.out.println("NO") System.out.println System.out System System.out "NO" {
			System.out.println("YES");
		} System.out.println("YES") System.out.println System.out System System.out "YES" String[] args args public class Main {
  public static void main(String[] args){
	Scanner s = new Scanner(System.in);
	int a , b , c , max_num1, max_num2;
	int res_flg;
	//String n = s.next();
	int n = Integer.parseInt(s.nextLine());
	for(int i = 0;i<n;i++){
		String line = s.nextLine();
		String[] array = line.split(" ",0);
		a = Integer.parseInt(array[0]);
		b = Integer.parseInt(array[1]);
		c = Integer.parseInt(array[2]);
 
		if(a >= b && a >= c){
			if(a*a == b*b+c*c){
				res_flg = 1;
			}else{
				res_flg = 0;
			}
		}
		else if(b >= a && b >= c){
			if(b*b == a*a+c*c){
				res_flg = 1;
			}else{
				res_flg = 0;
			}
		}
		else if(c >= a && c >= b){
			if(c*c == b*b+a*a){
				res_flg = 1;
			}else{
				res_flg = 0;
			}
		}else{
			res_flg = 0;
		}
		if(res_flg == 0){
			System.out.println("NO");
		}else{
			System.out.println("YES");
		}
	}
  }
} public class Main {
  public static void main(String[] args){
	Scanner s = new Scanner(System.in);
	int a , b , c , max_num1, max_num2;
	int res_flg;
	//String n = s.next();
	int n = Integer.parseInt(s.nextLine());
	for(int i = 0;i<n;i++){
		String line = s.nextLine();
		String[] array = line.split(" ",0);
		a = Integer.parseInt(array[0]);
		b = Integer.parseInt(array[1]);
		c = Integer.parseInt(array[2]);
 
		if(a >= b && a >= c){
			if(a*a == b*b+c*c){
				res_flg = 1;
			}else{
				res_flg = 0;
			}
		}
		else if(b >= a && b >= c){
			if(b*b == a*a+c*c){
				res_flg = 1;
			}else{
				res_flg = 0;
			}
		}
		else if(c >= a && c >= b){
			if(c*c == b*b+a*a){
				res_flg = 1;
			}else{
				res_flg = 0;
			}
		}else{
			res_flg = 0;
		}
		if(res_flg == 0){
			System.out.println("NO");
		}else{
			System.out.println("YES");
		}
	}
  }
} Main
import java.util.Scanner;
 
public class Main {
  public static void main(String[] args){
	Scanner s = new Scanner(System.in);
	int a , b , c , max_num1, max_num2;
	int res_flg;
	//String n = s.next();
	int n = Integer.parseInt(s.nextLine());
	for(int i = 0;i<n;i++){
		String line = s.nextLine();
		String[] array = line.split(" ",0);
		a = Integer.parseInt(array[0]);
		b = Integer.parseInt(array[1]);
		c = Integer.parseInt(array[2]);
 
		if(a >= b && a >= c){
			if(a*a == b*b+c*c){
				res_flg = 1;
			}else{
				res_flg = 0;
			}
		}
		else if(b >= a && b >= c){
			if(b*b == a*a+c*c){
				res_flg = 1;
			}else{
				res_flg = 0;
			}
		}
		else if(c >= a && c >= b){
			if(c*c == b*b+a*a){
				res_flg = 1;
			}else{
				res_flg = 0;
			}
		}else{
			res_flg = 0;
		}
		if(res_flg == 0){
			System.out.println("NO");
		}else{
			System.out.println("YES");
		}
	}
  }
}