import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

  public static void main(String[] args) throws IOException {
    
    try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {

      int n = Integer.parseInt(br.readLine());
      String[] line;
      int[] l = new int[]{0,0,0};
      String ans;
      StringBuilder result = new StringBuilder();

      for(int i=0; i<n; i++) {
        ans = "NO";
        line = br.readLine().split(" ");
        l[0] = Integer.parseInt(line[0]);
        l[1] = Integer.parseInt(line[1]);
        l[2] = Integer.parseInt(line[2]);

        for(int j=0,t; j<3; j++) {
          for(int k=0; k<3; k++) {
            if( l[j] < l[k] ) {
              t = l[j];
              l[j] = l[k];
              l[k] = t;
            }
          }
        }

        if( l[0]*l[0] + l[1]*l[1] == l[2]*l[2] )
          ans = "YES";
        result.append( ans ).append("\n");
      }

      System.out.print(result);
    }
  }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

  public static void main(String[] args) throws IOException {
    
    try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {

      int n = Integer.parseInt(br.readLine());
      String[] line;
      int[] l = new int[]{0,0,0};
      String ans;
      StringBuilder result = new StringBuilder();

      for(int i=0; i<n; i++) {
        ans = "NO";
        line = br.readLine().split(" ");
        l[0] = Integer.parseInt(line[0]);
        l[1] = Integer.parseInt(line[1]);
        l[2] = Integer.parseInt(line[2]);

        for(int j=0,t; j<3; j++) {
          for(int k=0; k<3; k++) {
            if( l[j] < l[k] ) {
              t = l[j];
              l[j] = l[k];
              l[k] = t;
            }
          }
        }

        if( l[0]*l[0] + l[1]*l[1] == l[2]*l[2] )
          ans = "YES";
        result.append( ans ).append("\n");
      }

      System.out.print(result);
    }
  }
} Main public static void main(String[] args) throws IOException {
    
    try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {

      int n = Integer.parseInt(br.readLine());
      String[] line;
      int[] l = new int[]{0,0,0};
      String ans;
      StringBuilder result = new StringBuilder();

      for(int i=0; i<n; i++) {
        ans = "NO";
        line = br.readLine().split(" ");
        l[0] = Integer.parseInt(line[0]);
        l[1] = Integer.parseInt(line[1]);
        l[2] = Integer.parseInt(line[2]);

        for(int j=0,t; j<3; j++) {
          for(int k=0; k<3; k++) {
            if( l[j] < l[k] ) {
              t = l[j];
              l[j] = l[k];
              l[k] = t;
            }
          }
        }

        if( l[0]*l[0] + l[1]*l[1] == l[2]*l[2] )
          ans = "YES";
        result.append( ans ).append("\n");
      }

      System.out.print(result);
    }
  } main {
    
    try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {

      int n = Integer.parseInt(br.readLine());
      String[] line;
      int[] l = new int[]{0,0,0};
      String ans;
      StringBuilder result = new StringBuilder();

      for(int i=0; i<n; i++) {
        ans = "NO";
        line = br.readLine().split(" ");
        l[0] = Integer.parseInt(line[0]);
        l[1] = Integer.parseInt(line[1]);
        l[2] = Integer.parseInt(line[2]);

        for(int j=0,t; j<3; j++) {
          for(int k=0; k<3; k++) {
            if( l[j] < l[k] ) {
              t = l[j];
              l[j] = l[k];
              l[k] = t;
            }
          }
        }

        if( l[0]*l[0] + l[1]*l[1] == l[2]*l[2] )
          ans = "YES";
        result.append( ans ).append("\n");
      }

      System.out.print(result);
    }
  } try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {

      int n = Integer.parseInt(br.readLine());
      String[] line;
      int[] l = new int[]{0,0,0};
      String ans;
      StringBuilder result = new StringBuilder();

      for(int i=0; i<n; i++) {
        ans = "NO";
        line = br.readLine().split(" ");
        l[0] = Integer.parseInt(line[0]);
        l[1] = Integer.parseInt(line[1]);
        l[2] = Integer.parseInt(line[2]);

        for(int j=0,t; j<3; j++) {
          for(int k=0; k<3; k++) {
            if( l[j] < l[k] ) {
              t = l[j];
              l[j] = l[k];
              l[k] = t;
            }
          }
        }

        if( l[0]*l[0] + l[1]*l[1] == l[2]*l[2] )
          ans = "YES";
        result.append( ans ).append("\n");
      }

      System.out.print(result);
    } {

      int n = Integer.parseInt(br.readLine());
      String[] line;
      int[] l = new int[]{0,0,0};
      String ans;
      StringBuilder result = new StringBuilder();

      for(int i=0; i<n; i++) {
        ans = "NO";
        line = br.readLine().split(" ");
        l[0] = Integer.parseInt(line[0]);
        l[1] = Integer.parseInt(line[1]);
        l[2] = Integer.parseInt(line[2]);

        for(int j=0,t; j<3; j++) {
          for(int k=0; k<3; k++) {
            if( l[j] < l[k] ) {
              t = l[j];
              l[j] = l[k];
              l[k] = t;
            }
          }
        }

        if( l[0]*l[0] + l[1]*l[1] == l[2]*l[2] )
          ans = "YES";
        result.append( ans ).append("\n");
      }

      System.out.print(result);
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) new BufferedReader(new InputStreamReader(System.in)) int n = Integer.parseInt(br.readLine()); n Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br String[] line; line int[] l = new int[]{0,0,0}; l new int[]{0,0,0} String ans; ans StringBuilder result = new StringBuilder(); result new StringBuilder() for(int i=0; i<n; i++) {
        ans = "NO";
        line = br.readLine().split(" ");
        l[0] = Integer.parseInt(line[0]);
        l[1] = Integer.parseInt(line[1]);
        l[2] = Integer.parseInt(line[2]);

        for(int j=0,t; j<3; j++) {
          for(int k=0; k<3; k++) {
            if( l[j] < l[k] ) {
              t = l[j];
              l[j] = l[k];
              l[k] = t;
            }
          }
        }

        if( l[0]*l[0] + l[1]*l[1] == l[2]*l[2] )
          ans = "YES";
        result.append( ans ).append("\n");
      } int i=0; int i=0; i 0 i<n i n i++ i++ i {
        ans = "NO";
        line = br.readLine().split(" ");
        l[0] = Integer.parseInt(line[0]);
        l[1] = Integer.parseInt(line[1]);
        l[2] = Integer.parseInt(line[2]);

        for(int j=0,t; j<3; j++) {
          for(int k=0; k<3; k++) {
            if( l[j] < l[k] ) {
              t = l[j];
              l[j] = l[k];
              l[k] = t;
            }
          }
        }

        if( l[0]*l[0] + l[1]*l[1] == l[2]*l[2] )
          ans = "YES";
        result.append( ans ).append("\n");
      } {
        ans = "NO";
        line = br.readLine().split(" ");
        l[0] = Integer.parseInt(line[0]);
        l[1] = Integer.parseInt(line[1]);
        l[2] = Integer.parseInt(line[2]);

        for(int j=0,t; j<3; j++) {
          for(int k=0; k<3; k++) {
            if( l[j] < l[k] ) {
              t = l[j];
              l[j] = l[k];
              l[k] = t;
            }
          }
        }

        if( l[0]*l[0] + l[1]*l[1] == l[2]*l[2] )
          ans = "YES";
        result.append( ans ).append("\n");
      } ans = "NO" ans "NO" line = br.readLine().split(" ") line br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " l[0] = Integer.parseInt(line[0]) l[0] l 0 Integer.parseInt(line[0]) Integer.parseInt Integer line[0] line 0 l[1] = Integer.parseInt(line[1]) l[1] l 1 Integer.parseInt(line[1]) Integer.parseInt Integer line[1] line 1 l[2] = Integer.parseInt(line[2]) l[2] l 2 Integer.parseInt(line[2]) Integer.parseInt Integer line[2] line 2 for(int j=0,t; j<3; j++) {
          for(int k=0; k<3; k++) {
            if( l[j] < l[k] ) {
              t = l[j];
              l[j] = l[k];
              l[k] = t;
            }
          }
        } int j=0,t; int j=0 j 0 t; t j<3 j 3 j++ j++ j {
          for(int k=0; k<3; k++) {
            if( l[j] < l[k] ) {
              t = l[j];
              l[j] = l[k];
              l[k] = t;
            }
          }
        } {
          for(int k=0; k<3; k++) {
            if( l[j] < l[k] ) {
              t = l[j];
              l[j] = l[k];
              l[k] = t;
            }
          }
        } for(int k=0; k<3; k++) {
            if( l[j] < l[k] ) {
              t = l[j];
              l[j] = l[k];
              l[k] = t;
            }
          } int k=0; int k=0; k 0 k<3 k 3 k++ k++ k {
            if( l[j] < l[k] ) {
              t = l[j];
              l[j] = l[k];
              l[k] = t;
            }
          } {
            if( l[j] < l[k] ) {
              t = l[j];
              l[j] = l[k];
              l[k] = t;
            }
          } if( l[j] < l[k] ) {
              t = l[j];
              l[j] = l[k];
              l[k] = t;
            } l[j] < l[k] l[j] l j l[k] l k {
              t = l[j];
              l[j] = l[k];
              l[k] = t;
            } t = l[j] t l[j] l j l[j] = l[k] l[j] l j l[k] l k l[k] = t l[k] l k t if( l[0]*l[0] + l[1]*l[1] == l[2]*l[2] )
          ans = "YES"; l[0]*l[0] + l[1]*l[1] == l[2]*l[2] l[0]*l[0] + l[1]*l[1] l[0]*l[0] l[0] l 0 l[0] l 0 l[1]*l[1] l[1] l 1 l[1] l 1 l[2]*l[2] l[2] l 2 l[2] l 2 ans = "YES" ans "YES" result.append( ans ).append("\n") result.append( ans ).append result.append( ans ) result.append result ans "\n" System.out.print(result) System.out.print System.out System System.out result String[] args args public class Main {

  public static void main(String[] args) throws IOException {
    
    try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {

      int n = Integer.parseInt(br.readLine());
      String[] line;
      int[] l = new int[]{0,0,0};
      String ans;
      StringBuilder result = new StringBuilder();

      for(int i=0; i<n; i++) {
        ans = "NO";
        line = br.readLine().split(" ");
        l[0] = Integer.parseInt(line[0]);
        l[1] = Integer.parseInt(line[1]);
        l[2] = Integer.parseInt(line[2]);

        for(int j=0,t; j<3; j++) {
          for(int k=0; k<3; k++) {
            if( l[j] < l[k] ) {
              t = l[j];
              l[j] = l[k];
              l[k] = t;
            }
          }
        }

        if( l[0]*l[0] + l[1]*l[1] == l[2]*l[2] )
          ans = "YES";
        result.append( ans ).append("\n");
      }

      System.out.print(result);
    }
  }
} public class Main {

  public static void main(String[] args) throws IOException {
    
    try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {

      int n = Integer.parseInt(br.readLine());
      String[] line;
      int[] l = new int[]{0,0,0};
      String ans;
      StringBuilder result = new StringBuilder();

      for(int i=0; i<n; i++) {
        ans = "NO";
        line = br.readLine().split(" ");
        l[0] = Integer.parseInt(line[0]);
        l[1] = Integer.parseInt(line[1]);
        l[2] = Integer.parseInt(line[2]);

        for(int j=0,t; j<3; j++) {
          for(int k=0; k<3; k++) {
            if( l[j] < l[k] ) {
              t = l[j];
              l[j] = l[k];
              l[k] = t;
            }
          }
        }

        if( l[0]*l[0] + l[1]*l[1] == l[2]*l[2] )
          ans = "YES";
        result.append( ans ).append("\n");
      }

      System.out.print(result);
    }
  }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

  public static void main(String[] args) throws IOException {
    
    try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {

      int n = Integer.parseInt(br.readLine());
      String[] line;
      int[] l = new int[]{0,0,0};
      String ans;
      StringBuilder result = new StringBuilder();

      for(int i=0; i<n; i++) {
        ans = "NO";
        line = br.readLine().split(" ");
        l[0] = Integer.parseInt(line[0]);
        l[1] = Integer.parseInt(line[1]);
        l[2] = Integer.parseInt(line[2]);

        for(int j=0,t; j<3; j++) {
          for(int k=0; k<3; k++) {
            if( l[j] < l[k] ) {
              t = l[j];
              l[j] = l[k];
              l[k] = t;
            }
          }
        }

        if( l[0]*l[0] + l[1]*l[1] == l[2]*l[2] )
          ans = "YES";
        result.append( ans ).append("\n");
      }

      System.out.print(result);
    }
  }
}
