import java.util.*;

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

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