import java.io.*;
import java.util.*;

class Main {
  public static void main(String[] args) {
    int N;
    Scanner sc = new Scanner(System.in);

    N = sc.nextInt();

    for (int i = 0; i < N; i++) {
      int a,b,c;

      a = sc.nextInt();
      b = sc.nextInt();
      c = sc.nextInt();

      if (a+b > c && a+c > b && b+c > a) {
        if (a*a+b*b == c*c || a*a+c*c==b*b || b*b+c*c==a*a) {
          System.out.println("YES");
        } else {
          System.out.println("NO");
        }
      } else {
        System.out.println("NO");
      }
    }
  }
} import java.io.*; io.* java import java.util.*; util.* java class Main {
  public static void main(String[] args) {
    int N;
    Scanner sc = new Scanner(System.in);

    N = sc.nextInt();

    for (int i = 0; i < N; i++) {
      int a,b,c;

      a = sc.nextInt();
      b = sc.nextInt();
      c = sc.nextInt();

      if (a+b > c && a+c > b && b+c > a) {
        if (a*a+b*b == c*c || a*a+c*c==b*b || b*b+c*c==a*a) {
          System.out.println("YES");
        } else {
          System.out.println("NO");
        }
      } else {
        System.out.println("NO");
      }
    }
  }
} Main public static void main(String[] args) {
    int N;
    Scanner sc = new Scanner(System.in);

    N = sc.nextInt();

    for (int i = 0; i < N; i++) {
      int a,b,c;

      a = sc.nextInt();
      b = sc.nextInt();
      c = sc.nextInt();

      if (a+b > c && a+c > b && b+c > a) {
        if (a*a+b*b == c*c || a*a+c*c==b*b || b*b+c*c==a*a) {
          System.out.println("YES");
        } else {
          System.out.println("NO");
        }
      } else {
        System.out.println("NO");
      }
    }
  } main {
    int N;
    Scanner sc = new Scanner(System.in);

    N = sc.nextInt();

    for (int i = 0; i < N; i++) {
      int a,b,c;

      a = sc.nextInt();
      b = sc.nextInt();
      c = sc.nextInt();

      if (a+b > c && a+c > b && b+c > a) {
        if (a*a+b*b == c*c || a*a+c*c==b*b || b*b+c*c==a*a) {
          System.out.println("YES");
        } else {
          System.out.println("NO");
        }
      } else {
        System.out.println("NO");
      }
    }
  } int N; N Scanner sc = new Scanner(System.in); sc new Scanner(System.in) N = sc.nextInt() N sc.nextInt() sc.nextInt sc for (int i = 0; i < N; i++) {
      int a,b,c;

      a = sc.nextInt();
      b = sc.nextInt();
      c = sc.nextInt();

      if (a+b > c && a+c > b && b+c > a) {
        if (a*a+b*b == c*c || a*a+c*c==b*b || b*b+c*c==a*a) {
          System.out.println("YES");
        } else {
          System.out.println("NO");
        }
      } else {
        System.out.println("NO");
      }
    } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
      int a,b,c;

      a = sc.nextInt();
      b = sc.nextInt();
      c = sc.nextInt();

      if (a+b > c && a+c > b && b+c > a) {
        if (a*a+b*b == c*c || a*a+c*c==b*b || b*b+c*c==a*a) {
          System.out.println("YES");
        } else {
          System.out.println("NO");
        }
      } else {
        System.out.println("NO");
      }
    } {
      int a,b,c;

      a = sc.nextInt();
      b = sc.nextInt();
      c = sc.nextInt();

      if (a+b > c && a+c > b && b+c > a) {
        if (a*a+b*b == c*c || a*a+c*c==b*b || b*b+c*c==a*a) {
          System.out.println("YES");
        } else {
          System.out.println("NO");
        }
      } else {
        System.out.println("NO");
      }
    } int a a b b c; c a = sc.nextInt() a sc.nextInt() sc.nextInt sc b = sc.nextInt() b sc.nextInt() sc.nextInt sc c = sc.nextInt() c sc.nextInt() sc.nextInt sc if (a+b > c && a+c > b && b+c > a) {
        if (a*a+b*b == c*c || a*a+c*c==b*b || b*b+c*c==a*a) {
          System.out.println("YES");
        } else {
          System.out.println("NO");
        }
      } else {
        System.out.println("NO");
      } a+b > c && a+c > b && b+c > a a+b > c && a+c > b && b+c > a a+b > c a+b a b c a+c > b a+c a c b b+c > a b+c b c a {
        if (a*a+b*b == c*c || a*a+c*c==b*b || b*b+c*c==a*a) {
          System.out.println("YES");
        } else {
          System.out.println("NO");
        }
      } if (a*a+b*b == c*c || a*a+c*c==b*b || b*b+c*c==a*a) {
          System.out.println("YES");
        } else {
          System.out.println("NO");
        } a*a+b*b == c*c || a*a+c*c==b*b || b*b+c*c==a*a a*a+b*b == c*c || a*a+c*c==b*b || b*b+c*c==a*a a*a+b*b == c*c a*a+b*b a*a a a b*b b b c*c c c a*a+c*c==b*b a*a+c*c a*a a a c*c c c b*b b b b*b+c*c==a*a b*b+c*c b*b b b c*c c c a*a a a {
          System.out.println("YES");
        } System.out.println("YES") System.out.println System.out System System.out "YES" {
          System.out.println("NO");
        } System.out.println("NO") System.out.println System.out System System.out "NO" {
        System.out.println("NO");
      } System.out.println("NO") System.out.println System.out System System.out "NO" String[] args args
import java.io.*;
import java.util.*;

class Main {
  public static void main(String[] args) {
    int N;
    Scanner sc = new Scanner(System.in);

    N = sc.nextInt();

    for (int i = 0; i < N; i++) {
      int a,b,c;

      a = sc.nextInt();
      b = sc.nextInt();
      c = sc.nextInt();

      if (a+b > c && a+c > b && b+c > a) {
        if (a*a+b*b == c*c || a*a+c*c==b*b || b*b+c*c==a*a) {
          System.out.println("YES");
        } else {
          System.out.println("NO");
        }
      } else {
        System.out.println("NO");
      }
    }
  }
}