import java.util.Scanner;
import java.util.Arrays;

public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int z = sc.nextInt();
        int[] num = new int[3];
        for(int i = 0; i < z; i++){
            for(int j = 0; j < num.length; j++){
                num[j] = sc.nextInt();
            }
            Arrays.sort(num);
            if(num[0]*num[0] + num[1]*num[1] == num[2]*num[2]){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }
        }
    }
} import java.util.Scanner; Scanner java.util import java.util.Arrays; Arrays java.util public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int z = sc.nextInt();
        int[] num = new int[3];
        for(int i = 0; i < z; i++){
            for(int j = 0; j < num.length; j++){
                num[j] = sc.nextInt();
            }
            Arrays.sort(num);
            if(num[0]*num[0] + num[1]*num[1] == num[2]*num[2]){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }
        }
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int z = sc.nextInt();
        int[] num = new int[3];
        for(int i = 0; i < z; i++){
            for(int j = 0; j < num.length; j++){
                num[j] = sc.nextInt();
            }
            Arrays.sort(num);
            if(num[0]*num[0] + num[1]*num[1] == num[2]*num[2]){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int z = sc.nextInt();
        int[] num = new int[3];
        for(int i = 0; i < z; i++){
            for(int j = 0; j < num.length; j++){
                num[j] = sc.nextInt();
            }
            Arrays.sort(num);
            if(num[0]*num[0] + num[1]*num[1] == num[2]*num[2]){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int z = sc.nextInt(); z sc.nextInt() sc.nextInt sc int[] num = new int[3]; num new int[3] 3 for(int i = 0; i < z; i++){
            for(int j = 0; j < num.length; j++){
                num[j] = sc.nextInt();
            }
            Arrays.sort(num);
            if(num[0]*num[0] + num[1]*num[1] == num[2]*num[2]){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }
        } int i = 0; int i = 0; i 0 i < z i z i++ i++ i {
            for(int j = 0; j < num.length; j++){
                num[j] = sc.nextInt();
            }
            Arrays.sort(num);
            if(num[0]*num[0] + num[1]*num[1] == num[2]*num[2]){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }
        } {
            for(int j = 0; j < num.length; j++){
                num[j] = sc.nextInt();
            }
            Arrays.sort(num);
            if(num[0]*num[0] + num[1]*num[1] == num[2]*num[2]){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }
        } for(int j = 0; j < num.length; j++){
                num[j] = sc.nextInt();
            } int j = 0; int j = 0; j 0 j < num.length j num.length num num.length j++ j++ j {
                num[j] = sc.nextInt();
            } {
                num[j] = sc.nextInt();
            } num[j] = sc.nextInt() num[j] num j sc.nextInt() sc.nextInt sc Arrays.sort(num) Arrays.sort Arrays num if(num[0]*num[0] + num[1]*num[1] == num[2]*num[2]){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            } num[0]*num[0] + num[1]*num[1] == num[2]*num[2] num[0]*num[0] + num[1]*num[1] num[0]*num[0] num[0] num 0 num[0] num 0 num[1]*num[1] num[1] num 1 num[1] num 1 num[2]*num[2] num[2] num 2 num[2] num 2 {
                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 sc = new Scanner(System.in);
        int z = sc.nextInt();
        int[] num = new int[3];
        for(int i = 0; i < z; i++){
            for(int j = 0; j < num.length; j++){
                num[j] = sc.nextInt();
            }
            Arrays.sort(num);
            if(num[0]*num[0] + num[1]*num[1] == num[2]*num[2]){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }
        }
    }
} public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int z = sc.nextInt();
        int[] num = new int[3];
        for(int i = 0; i < z; i++){
            for(int j = 0; j < num.length; j++){
                num[j] = sc.nextInt();
            }
            Arrays.sort(num);
            if(num[0]*num[0] + num[1]*num[1] == num[2]*num[2]){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }
        }
    }
} Main
import java.util.Scanner;
import java.util.Arrays;

public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int z = sc.nextInt();
        int[] num = new int[3];
        for(int i = 0; i < z; i++){
            for(int j = 0; j < num.length; j++){
                num[j] = sc.nextInt();
            }
            Arrays.sort(num);
            if(num[0]*num[0] + num[1]*num[1] == num[2]*num[2]){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }
        }
    }
}