import java.util.Scanner;

public class Main{
     public static void main(String[] args){
          Scanner kb = new Scanner(System.in);
          int i, N, x, y, z, longest;
          
          N = kb.nextInt();
          
          for(i = 0 ; i < N ; i++){
               x = kb.nextInt();
               y = kb.nextInt();
               z = kb.nextInt();
               longest = x;
               if (longest < y){
                    longest = y;
               }
               if (longest < z){
                    longest = z;
               }
               if (longest == x){
                    if ((x * x) == (y * y + z * z)){
                         System.out.println("YES");
                    }
                    else{
                         System.out.println("NO");
                    }
               }
               else if (longest == y){
                    if ((y * y) == (x * x + z * z)){
                         System.out.println("YES");
                    }
                    else{
                         System.out.println("NO");
                    }
               }
               else if (longest == z){
                    if ((z * z) == (x * x + y * y)){
                         System.out.println("YES");
                    }
                    else{
                         System.out.println("NO");
                    }
               }
          }
     }
} import java.util.Scanner; Scanner java.util public class Main{
     public static void main(String[] args){
          Scanner kb = new Scanner(System.in);
          int i, N, x, y, z, longest;
          
          N = kb.nextInt();
          
          for(i = 0 ; i < N ; i++){
               x = kb.nextInt();
               y = kb.nextInt();
               z = kb.nextInt();
               longest = x;
               if (longest < y){
                    longest = y;
               }
               if (longest < z){
                    longest = z;
               }
               if (longest == x){
                    if ((x * x) == (y * y + z * z)){
                         System.out.println("YES");
                    }
                    else{
                         System.out.println("NO");
                    }
               }
               else if (longest == y){
                    if ((y * y) == (x * x + z * z)){
                         System.out.println("YES");
                    }
                    else{
                         System.out.println("NO");
                    }
               }
               else if (longest == z){
                    if ((z * z) == (x * x + y * y)){
                         System.out.println("YES");
                    }
                    else{
                         System.out.println("NO");
                    }
               }
          }
     }
} Main public static void main(String[] args){
          Scanner kb = new Scanner(System.in);
          int i, N, x, y, z, longest;
          
          N = kb.nextInt();
          
          for(i = 0 ; i < N ; i++){
               x = kb.nextInt();
               y = kb.nextInt();
               z = kb.nextInt();
               longest = x;
               if (longest < y){
                    longest = y;
               }
               if (longest < z){
                    longest = z;
               }
               if (longest == x){
                    if ((x * x) == (y * y + z * z)){
                         System.out.println("YES");
                    }
                    else{
                         System.out.println("NO");
                    }
               }
               else if (longest == y){
                    if ((y * y) == (x * x + z * z)){
                         System.out.println("YES");
                    }
                    else{
                         System.out.println("NO");
                    }
               }
               else if (longest == z){
                    if ((z * z) == (x * x + y * y)){
                         System.out.println("YES");
                    }
                    else{
                         System.out.println("NO");
                    }
               }
          }
     } main {
          Scanner kb = new Scanner(System.in);
          int i, N, x, y, z, longest;
          
          N = kb.nextInt();
          
          for(i = 0 ; i < N ; i++){
               x = kb.nextInt();
               y = kb.nextInt();
               z = kb.nextInt();
               longest = x;
               if (longest < y){
                    longest = y;
               }
               if (longest < z){
                    longest = z;
               }
               if (longest == x){
                    if ((x * x) == (y * y + z * z)){
                         System.out.println("YES");
                    }
                    else{
                         System.out.println("NO");
                    }
               }
               else if (longest == y){
                    if ((y * y) == (x * x + z * z)){
                         System.out.println("YES");
                    }
                    else{
                         System.out.println("NO");
                    }
               }
               else if (longest == z){
                    if ((z * z) == (x * x + y * y)){
                         System.out.println("YES");
                    }
                    else{
                         System.out.println("NO");
                    }
               }
          }
     } Scanner kb = new Scanner(System.in); kb new Scanner(System.in) int i i N N x x y y z z longest; longest N = kb.nextInt() N kb.nextInt() kb.nextInt kb for(i = 0 ; i < N ; i++){
               x = kb.nextInt();
               y = kb.nextInt();
               z = kb.nextInt();
               longest = x;
               if (longest < y){
                    longest = y;
               }
               if (longest < z){
                    longest = z;
               }
               if (longest == x){
                    if ((x * x) == (y * y + z * z)){
                         System.out.println("YES");
                    }
                    else{
                         System.out.println("NO");
                    }
               }
               else if (longest == y){
                    if ((y * y) == (x * x + z * z)){
                         System.out.println("YES");
                    }
                    else{
                         System.out.println("NO");
                    }
               }
               else if (longest == z){
                    if ((z * z) == (x * x + y * y)){
                         System.out.println("YES");
                    }
                    else{
                         System.out.println("NO");
                    }
               }
          } i = 0 ; i = 0 i 0 i < N i N i++ i++ i {
               x = kb.nextInt();
               y = kb.nextInt();
               z = kb.nextInt();
               longest = x;
               if (longest < y){
                    longest = y;
               }
               if (longest < z){
                    longest = z;
               }
               if (longest == x){
                    if ((x * x) == (y * y + z * z)){
                         System.out.println("YES");
                    }
                    else{
                         System.out.println("NO");
                    }
               }
               else if (longest == y){
                    if ((y * y) == (x * x + z * z)){
                         System.out.println("YES");
                    }
                    else{
                         System.out.println("NO");
                    }
               }
               else if (longest == z){
                    if ((z * z) == (x * x + y * y)){
                         System.out.println("YES");
                    }
                    else{
                         System.out.println("NO");
                    }
               }
          } {
               x = kb.nextInt();
               y = kb.nextInt();
               z = kb.nextInt();
               longest = x;
               if (longest < y){
                    longest = y;
               }
               if (longest < z){
                    longest = z;
               }
               if (longest == x){
                    if ((x * x) == (y * y + z * z)){
                         System.out.println("YES");
                    }
                    else{
                         System.out.println("NO");
                    }
               }
               else if (longest == y){
                    if ((y * y) == (x * x + z * z)){
                         System.out.println("YES");
                    }
                    else{
                         System.out.println("NO");
                    }
               }
               else if (longest == z){
                    if ((z * z) == (x * x + y * y)){
                         System.out.println("YES");
                    }
                    else{
                         System.out.println("NO");
                    }
               }
          } x = kb.nextInt() x kb.nextInt() kb.nextInt kb y = kb.nextInt() y kb.nextInt() kb.nextInt kb z = kb.nextInt() z kb.nextInt() kb.nextInt kb longest = x longest x if (longest < y){
                    longest = y;
               } longest < y longest y {
                    longest = y;
               } longest = y longest y if (longest < z){
                    longest = z;
               } longest < z longest z {
                    longest = z;
               } longest = z longest z if (longest == x){
                    if ((x * x) == (y * y + z * z)){
                         System.out.println("YES");
                    }
                    else{
                         System.out.println("NO");
                    }
               }
               else if (longest == y){
                    if ((y * y) == (x * x + z * z)){
                         System.out.println("YES");
                    }
                    else{
                         System.out.println("NO");
                    }
               }
               else if (longest == z){
                    if ((z * z) == (x * x + y * y)){
                         System.out.println("YES");
                    }
                    else{
                         System.out.println("NO");
                    }
               } longest == x longest x {
                    if ((x * x) == (y * y + z * z)){
                         System.out.println("YES");
                    }
                    else{
                         System.out.println("NO");
                    }
               } if ((x * x) == (y * y + z * z)){
                         System.out.println("YES");
                    }
                    else{
                         System.out.println("NO");
                    } (x * x) == (y * y + z * z) (x * x) x x (y * y + z * z) y * y y y z * z z z {
                         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" if (longest == y){
                    if ((y * y) == (x * x + z * z)){
                         System.out.println("YES");
                    }
                    else{
                         System.out.println("NO");
                    }
               }
               else if (longest == z){
                    if ((z * z) == (x * x + y * y)){
                         System.out.println("YES");
                    }
                    else{
                         System.out.println("NO");
                    }
               } longest == y longest y {
                    if ((y * y) == (x * x + z * z)){
                         System.out.println("YES");
                    }
                    else{
                         System.out.println("NO");
                    }
               } if ((y * y) == (x * x + z * z)){
                         System.out.println("YES");
                    }
                    else{
                         System.out.println("NO");
                    } (y * y) == (x * x + z * z) (y * y) y y (x * x + z * z) x * x x x z * z z z {
                         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" if (longest == z){
                    if ((z * z) == (x * x + y * y)){
                         System.out.println("YES");
                    }
                    else{
                         System.out.println("NO");
                    }
               } longest == z longest z {
                    if ((z * z) == (x * x + y * y)){
                         System.out.println("YES");
                    }
                    else{
                         System.out.println("NO");
                    }
               } if ((z * z) == (x * x + y * y)){
                         System.out.println("YES");
                    }
                    else{
                         System.out.println("NO");
                    } (z * z) == (x * x + y * y) (z * z) z z (x * x + y * y) x * x x x y * y y y {
                         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" String[] args args public class Main{
     public static void main(String[] args){
          Scanner kb = new Scanner(System.in);
          int i, N, x, y, z, longest;
          
          N = kb.nextInt();
          
          for(i = 0 ; i < N ; i++){
               x = kb.nextInt();
               y = kb.nextInt();
               z = kb.nextInt();
               longest = x;
               if (longest < y){
                    longest = y;
               }
               if (longest < z){
                    longest = z;
               }
               if (longest == x){
                    if ((x * x) == (y * y + z * z)){
                         System.out.println("YES");
                    }
                    else{
                         System.out.println("NO");
                    }
               }
               else if (longest == y){
                    if ((y * y) == (x * x + z * z)){
                         System.out.println("YES");
                    }
                    else{
                         System.out.println("NO");
                    }
               }
               else if (longest == z){
                    if ((z * z) == (x * x + y * y)){
                         System.out.println("YES");
                    }
                    else{
                         System.out.println("NO");
                    }
               }
          }
     }
} public class Main{
     public static void main(String[] args){
          Scanner kb = new Scanner(System.in);
          int i, N, x, y, z, longest;
          
          N = kb.nextInt();
          
          for(i = 0 ; i < N ; i++){
               x = kb.nextInt();
               y = kb.nextInt();
               z = kb.nextInt();
               longest = x;
               if (longest < y){
                    longest = y;
               }
               if (longest < z){
                    longest = z;
               }
               if (longest == x){
                    if ((x * x) == (y * y + z * z)){
                         System.out.println("YES");
                    }
                    else{
                         System.out.println("NO");
                    }
               }
               else if (longest == y){
                    if ((y * y) == (x * x + z * z)){
                         System.out.println("YES");
                    }
                    else{
                         System.out.println("NO");
                    }
               }
               else if (longest == z){
                    if ((z * z) == (x * x + y * y)){
                         System.out.println("YES");
                    }
                    else{
                         System.out.println("NO");
                    }
               }
          }
     }
} Main
import java.util.Scanner;

public class Main{
     public static void main(String[] args){
          Scanner kb = new Scanner(System.in);
          int i, N, x, y, z, longest;
          
          N = kb.nextInt();
          
          for(i = 0 ; i < N ; i++){
               x = kb.nextInt();
               y = kb.nextInt();
               z = kb.nextInt();
               longest = x;
               if (longest < y){
                    longest = y;
               }
               if (longest < z){
                    longest = z;
               }
               if (longest == x){
                    if ((x * x) == (y * y + z * z)){
                         System.out.println("YES");
                    }
                    else{
                         System.out.println("NO");
                    }
               }
               else if (longest == y){
                    if ((y * y) == (x * x + z * z)){
                         System.out.println("YES");
                    }
                    else{
                         System.out.println("NO");
                    }
               }
               else if (longest == z){
                    if ((z * z) == (x * x + y * y)){
                         System.out.println("YES");
                    }
                    else{
                         System.out.println("NO");
                    }
               }
          }
     }
}