import java.io.*;
class Main{
  public static void main(String[] args) {
    try{
      BufferedReader br =
        new BufferedReader(new InputStreamReader(System.in));
      int i = Integer.parseInt(br.readLine());
      for(int f=0;f<i;f++){
        String[] str = br.readLine().split("\\s");
        int a = Integer.parseInt(str[0]);
        a*=a;
        int b = Integer.parseInt(str[1]);
        b*=b;
        int c = Integer.parseInt(str[2]);
        c*=c;
        if(a+b==c||b+c==a||c+a==b) System.out.println("YES");
        else System.out.println("NO");
      }
    }catch(IOException e){}
  }
} import java.io.*; io.* java class Main{
  public static void main(String[] args) {
    try{
      BufferedReader br =
        new BufferedReader(new InputStreamReader(System.in));
      int i = Integer.parseInt(br.readLine());
      for(int f=0;f<i;f++){
        String[] str = br.readLine().split("\\s");
        int a = Integer.parseInt(str[0]);
        a*=a;
        int b = Integer.parseInt(str[1]);
        b*=b;
        int c = Integer.parseInt(str[2]);
        c*=c;
        if(a+b==c||b+c==a||c+a==b) System.out.println("YES");
        else System.out.println("NO");
      }
    }catch(IOException e){}
  }
} Main public static void main(String[] args) {
    try{
      BufferedReader br =
        new BufferedReader(new InputStreamReader(System.in));
      int i = Integer.parseInt(br.readLine());
      for(int f=0;f<i;f++){
        String[] str = br.readLine().split("\\s");
        int a = Integer.parseInt(str[0]);
        a*=a;
        int b = Integer.parseInt(str[1]);
        b*=b;
        int c = Integer.parseInt(str[2]);
        c*=c;
        if(a+b==c||b+c==a||c+a==b) System.out.println("YES");
        else System.out.println("NO");
      }
    }catch(IOException e){}
  } main {
    try{
      BufferedReader br =
        new BufferedReader(new InputStreamReader(System.in));
      int i = Integer.parseInt(br.readLine());
      for(int f=0;f<i;f++){
        String[] str = br.readLine().split("\\s");
        int a = Integer.parseInt(str[0]);
        a*=a;
        int b = Integer.parseInt(str[1]);
        b*=b;
        int c = Integer.parseInt(str[2]);
        c*=c;
        if(a+b==c||b+c==a||c+a==b) System.out.println("YES");
        else System.out.println("NO");
      }
    }catch(IOException e){}
  } try{
      BufferedReader br =
        new BufferedReader(new InputStreamReader(System.in));
      int i = Integer.parseInt(br.readLine());
      for(int f=0;f<i;f++){
        String[] str = br.readLine().split("\\s");
        int a = Integer.parseInt(str[0]);
        a*=a;
        int b = Integer.parseInt(str[1]);
        b*=b;
        int c = Integer.parseInt(str[2]);
        c*=c;
        if(a+b==c||b+c==a||c+a==b) System.out.println("YES");
        else System.out.println("NO");
      }
    }catch(IOException e){} catch(IOException e){} IOException e {} {
      BufferedReader br =
        new BufferedReader(new InputStreamReader(System.in));
      int i = Integer.parseInt(br.readLine());
      for(int f=0;f<i;f++){
        String[] str = br.readLine().split("\\s");
        int a = Integer.parseInt(str[0]);
        a*=a;
        int b = Integer.parseInt(str[1]);
        b*=b;
        int c = Integer.parseInt(str[2]);
        c*=c;
        if(a+b==c||b+c==a||c+a==b) System.out.println("YES");
        else System.out.println("NO");
      }
    } BufferedReader br =
        new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int i = Integer.parseInt(br.readLine()); i Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br for(int f=0;f<i;f++){
        String[] str = br.readLine().split("\\s");
        int a = Integer.parseInt(str[0]);
        a*=a;
        int b = Integer.parseInt(str[1]);
        b*=b;
        int c = Integer.parseInt(str[2]);
        c*=c;
        if(a+b==c||b+c==a||c+a==b) System.out.println("YES");
        else System.out.println("NO");
      } int f=0; int f=0; f 0 f<i f i f++ f++ f {
        String[] str = br.readLine().split("\\s");
        int a = Integer.parseInt(str[0]);
        a*=a;
        int b = Integer.parseInt(str[1]);
        b*=b;
        int c = Integer.parseInt(str[2]);
        c*=c;
        if(a+b==c||b+c==a||c+a==b) System.out.println("YES");
        else System.out.println("NO");
      } {
        String[] str = br.readLine().split("\\s");
        int a = Integer.parseInt(str[0]);
        a*=a;
        int b = Integer.parseInt(str[1]);
        b*=b;
        int c = Integer.parseInt(str[2]);
        c*=c;
        if(a+b==c||b+c==a||c+a==b) System.out.println("YES");
        else System.out.println("NO");
      } String[] str = br.readLine().split("\\s"); str br.readLine().split("\\s") br.readLine().split br.readLine() br.readLine br "\\s" int a = Integer.parseInt(str[0]); a Integer.parseInt(str[0]) Integer.parseInt Integer str[0] str 0 a*=a a a int b = Integer.parseInt(str[1]); b Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 b*=b b b int c = Integer.parseInt(str[2]); c Integer.parseInt(str[2]) Integer.parseInt Integer str[2] str 2 c*=c c c if(a+b==c||b+c==a||c+a==b) System.out.println("YES");
        else System.out.println("NO"); a+b==c||b+c==a||c+a==b a+b==c||b+c==a||c+a==b a+b==c a+b a b c b+c==a b+c b c a c+a==b c+a c a b 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
import java.io.*;
class Main{
  public static void main(String[] args) {
    try{
      BufferedReader br =
        new BufferedReader(new InputStreamReader(System.in));
      int i = Integer.parseInt(br.readLine());
      for(int f=0;f<i;f++){
        String[] str = br.readLine().split("\\s");
        int a = Integer.parseInt(str[0]);
        a*=a;
        int b = Integer.parseInt(str[1]);
        b*=b;
        int c = Integer.parseInt(str[2]);
        c*=c;
        if(a+b==c||b+c==a||c+a==b) System.out.println("YES");
        else System.out.println("NO");
      }
    }catch(IOException e){}
  }
}