/* Volume0_3 */
import java.io.*;
import java.util.Arrays;

class Main
{
  public static void main(String[] args)
  {
    try{
      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      StringBuilder sb = new StringBuilder();
      int N = Integer.parseInt(br.readLine());
      int[] edges = new int[3];

      for(int i = 0; i < N; i++){
        String[] str = br.readLine().split(" ");
        for(int j = 0; j < 3; j++){
          edges[j] = Integer.parseInt(str[j]);
        }
        Arrays.sort(edges);

        if(Math.pow(edges[2], 2) == Math.pow(edges[0], 2) + Math.pow(edges[1], 2)){
          sb.append("YES").append("\n");
        }else {
          sb.append("NO").append("\n");
        }
      }
      System.out.print(sb);

    }catch(Exception e){
      System.out.println(e);
    }
  }
} import java.io.*; io.* java import java.util.Arrays; Arrays java.util class Main
{
  public static void main(String[] args)
  {
    try{
      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      StringBuilder sb = new StringBuilder();
      int N = Integer.parseInt(br.readLine());
      int[] edges = new int[3];

      for(int i = 0; i < N; i++){
        String[] str = br.readLine().split(" ");
        for(int j = 0; j < 3; j++){
          edges[j] = Integer.parseInt(str[j]);
        }
        Arrays.sort(edges);

        if(Math.pow(edges[2], 2) == Math.pow(edges[0], 2) + Math.pow(edges[1], 2)){
          sb.append("YES").append("\n");
        }else {
          sb.append("NO").append("\n");
        }
      }
      System.out.print(sb);

    }catch(Exception e){
      System.out.println(e);
    }
  }
} Main public static void main(String[] args)
  {
    try{
      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      StringBuilder sb = new StringBuilder();
      int N = Integer.parseInt(br.readLine());
      int[] edges = new int[3];

      for(int i = 0; i < N; i++){
        String[] str = br.readLine().split(" ");
        for(int j = 0; j < 3; j++){
          edges[j] = Integer.parseInt(str[j]);
        }
        Arrays.sort(edges);

        if(Math.pow(edges[2], 2) == Math.pow(edges[0], 2) + Math.pow(edges[1], 2)){
          sb.append("YES").append("\n");
        }else {
          sb.append("NO").append("\n");
        }
      }
      System.out.print(sb);

    }catch(Exception e){
      System.out.println(e);
    }
  } main {
    try{
      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      StringBuilder sb = new StringBuilder();
      int N = Integer.parseInt(br.readLine());
      int[] edges = new int[3];

      for(int i = 0; i < N; i++){
        String[] str = br.readLine().split(" ");
        for(int j = 0; j < 3; j++){
          edges[j] = Integer.parseInt(str[j]);
        }
        Arrays.sort(edges);

        if(Math.pow(edges[2], 2) == Math.pow(edges[0], 2) + Math.pow(edges[1], 2)){
          sb.append("YES").append("\n");
        }else {
          sb.append("NO").append("\n");
        }
      }
      System.out.print(sb);

    }catch(Exception e){
      System.out.println(e);
    }
  } try{
      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      StringBuilder sb = new StringBuilder();
      int N = Integer.parseInt(br.readLine());
      int[] edges = new int[3];

      for(int i = 0; i < N; i++){
        String[] str = br.readLine().split(" ");
        for(int j = 0; j < 3; j++){
          edges[j] = Integer.parseInt(str[j]);
        }
        Arrays.sort(edges);

        if(Math.pow(edges[2], 2) == Math.pow(edges[0], 2) + Math.pow(edges[1], 2)){
          sb.append("YES").append("\n");
        }else {
          sb.append("NO").append("\n");
        }
      }
      System.out.print(sb);

    }catch(Exception e){
      System.out.println(e);
    } catch(Exception e){
      System.out.println(e);
    } Exception e {
      System.out.println(e);
    } System.out.println(e) System.out.println System.out System System.out e {
      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      StringBuilder sb = new StringBuilder();
      int N = Integer.parseInt(br.readLine());
      int[] edges = new int[3];

      for(int i = 0; i < N; i++){
        String[] str = br.readLine().split(" ");
        for(int j = 0; j < 3; j++){
          edges[j] = Integer.parseInt(str[j]);
        }
        Arrays.sort(edges);

        if(Math.pow(edges[2], 2) == Math.pow(edges[0], 2) + Math.pow(edges[1], 2)){
          sb.append("YES").append("\n");
        }else {
          sb.append("NO").append("\n");
        }
      }
      System.out.print(sb);

    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) StringBuilder sb = new StringBuilder(); sb new StringBuilder() int N = Integer.parseInt(br.readLine()); N Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br int[] edges = new int[3]; edges new int[3] 3 for(int i = 0; i < N; i++){
        String[] str = br.readLine().split(" ");
        for(int j = 0; j < 3; j++){
          edges[j] = Integer.parseInt(str[j]);
        }
        Arrays.sort(edges);

        if(Math.pow(edges[2], 2) == Math.pow(edges[0], 2) + Math.pow(edges[1], 2)){
          sb.append("YES").append("\n");
        }else {
          sb.append("NO").append("\n");
        }
      } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
        String[] str = br.readLine().split(" ");
        for(int j = 0; j < 3; j++){
          edges[j] = Integer.parseInt(str[j]);
        }
        Arrays.sort(edges);

        if(Math.pow(edges[2], 2) == Math.pow(edges[0], 2) + Math.pow(edges[1], 2)){
          sb.append("YES").append("\n");
        }else {
          sb.append("NO").append("\n");
        }
      } {
        String[] str = br.readLine().split(" ");
        for(int j = 0; j < 3; j++){
          edges[j] = Integer.parseInt(str[j]);
        }
        Arrays.sort(edges);

        if(Math.pow(edges[2], 2) == Math.pow(edges[0], 2) + Math.pow(edges[1], 2)){
          sb.append("YES").append("\n");
        }else {
          sb.append("NO").append("\n");
        }
      } String[] str = br.readLine().split(" "); str br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " for(int j = 0; j < 3; j++){
          edges[j] = Integer.parseInt(str[j]);
        } int j = 0; int j = 0; j 0 j < 3 j 3 j++ j++ j {
          edges[j] = Integer.parseInt(str[j]);
        } {
          edges[j] = Integer.parseInt(str[j]);
        } edges[j] = Integer.parseInt(str[j]) edges[j] edges j Integer.parseInt(str[j]) Integer.parseInt Integer str[j] str j Arrays.sort(edges) Arrays.sort Arrays edges if(Math.pow(edges[2], 2) == Math.pow(edges[0], 2) + Math.pow(edges[1], 2)){
          sb.append("YES").append("\n");
        }else {
          sb.append("NO").append("\n");
        } Math.pow(edges[2], 2) == Math.pow(edges[0], 2) + Math.pow(edges[1], 2) Math.pow(edges[2], 2) Math.pow Math edges[2] edges 2 2 Math.pow(edges[0], 2) + Math.pow(edges[1], 2) Math.pow(edges[0], 2) Math.pow Math edges[0] edges 0 2 Math.pow(edges[1], 2) Math.pow Math edges[1] edges 1 2 {
          sb.append("YES").append("\n");
        } sb.append("YES").append("\n") sb.append("YES").append sb.append("YES") sb.append sb "YES" "\n" {
          sb.append("NO").append("\n");
        } sb.append("NO").append("\n") sb.append("NO").append sb.append("NO") sb.append sb "NO" "\n" System.out.print(sb) System.out.print System.out System System.out sb String[] args args
/* Volume0_3 */
import java.io.*;
import java.util.Arrays;

class Main
{
  public static void main(String[] args)
  {
    try{
      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      StringBuilder sb = new StringBuilder();
      int N = Integer.parseInt(br.readLine());
      int[] edges = new int[3];

      for(int i = 0; i < N; i++){
        String[] str = br.readLine().split(" ");
        for(int j = 0; j < 3; j++){
          edges[j] = Integer.parseInt(str[j]);
        }
        Arrays.sort(edges);

        if(Math.pow(edges[2], 2) == Math.pow(edges[0], 2) + Math.pow(edges[1], 2)){
          sb.append("YES").append("\n");
        }else {
          sb.append("NO").append("\n");
        }
      }
      System.out.print(sb);

    }catch(Exception e){
      System.out.println(e);
    }
  }
}