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

class Main{
    public static void main(String[] a){
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        int[] inputs = new int[3];

        String result;
        for(int i = 0;i < n;i++) {
            for (int j = 0; j < 3; j++) {
                int m = s.nextInt();
                inputs[j] = m * m;
            }
            Arrays.sort(inputs);
            result = inputs[0] + inputs[1] == inputs[2] ? "YES" : "NO";

            System.out.println(result);
        }
    }
} import java.util.Scanner; Scanner java.util import java.util.Arrays; Arrays java.util class Main{
    public static void main(String[] a){
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        int[] inputs = new int[3];

        String result;
        for(int i = 0;i < n;i++) {
            for (int j = 0; j < 3; j++) {
                int m = s.nextInt();
                inputs[j] = m * m;
            }
            Arrays.sort(inputs);
            result = inputs[0] + inputs[1] == inputs[2] ? "YES" : "NO";

            System.out.println(result);
        }
    }
} Main public static void main(String[] a){
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        int[] inputs = new int[3];

        String result;
        for(int i = 0;i < n;i++) {
            for (int j = 0; j < 3; j++) {
                int m = s.nextInt();
                inputs[j] = m * m;
            }
            Arrays.sort(inputs);
            result = inputs[0] + inputs[1] == inputs[2] ? "YES" : "NO";

            System.out.println(result);
        }
    } main {
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        int[] inputs = new int[3];

        String result;
        for(int i = 0;i < n;i++) {
            for (int j = 0; j < 3; j++) {
                int m = s.nextInt();
                inputs[j] = m * m;
            }
            Arrays.sort(inputs);
            result = inputs[0] + inputs[1] == inputs[2] ? "YES" : "NO";

            System.out.println(result);
        }
    } Scanner s = new Scanner(System.in); s new Scanner(System.in) int n = s.nextInt(); n s.nextInt() s.nextInt s int[] inputs = new int[3]; inputs new int[3] 3 String result; result for(int i = 0;i < n;i++) {
            for (int j = 0; j < 3; j++) {
                int m = s.nextInt();
                inputs[j] = m * m;
            }
            Arrays.sort(inputs);
            result = inputs[0] + inputs[1] == inputs[2] ? "YES" : "NO";

            System.out.println(result);
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            for (int j = 0; j < 3; j++) {
                int m = s.nextInt();
                inputs[j] = m * m;
            }
            Arrays.sort(inputs);
            result = inputs[0] + inputs[1] == inputs[2] ? "YES" : "NO";

            System.out.println(result);
        } {
            for (int j = 0; j < 3; j++) {
                int m = s.nextInt();
                inputs[j] = m * m;
            }
            Arrays.sort(inputs);
            result = inputs[0] + inputs[1] == inputs[2] ? "YES" : "NO";

            System.out.println(result);
        } for (int j = 0; j < 3; j++) {
                int m = s.nextInt();
                inputs[j] = m * m;
            } int j = 0; int j = 0; j 0 j < 3 j 3 j++ j++ j {
                int m = s.nextInt();
                inputs[j] = m * m;
            } {
                int m = s.nextInt();
                inputs[j] = m * m;
            } int m = s.nextInt(); m s.nextInt() s.nextInt s inputs[j] = m * m inputs[j] inputs j m * m m m Arrays.sort(inputs) Arrays.sort Arrays inputs result = inputs[0] + inputs[1] == inputs[2] ? "YES" : "NO" result inputs[0] + inputs[1] == inputs[2] ? "YES" : "NO" inputs[0] + inputs[1] == inputs[2] inputs[0] + inputs[1] inputs[0] inputs 0 inputs[1] inputs 1 inputs[2] inputs 2 "YES" "NO" System.out.println(result) System.out.println System.out System System.out result String[] a a
import java.util.Scanner;
import java.util.Arrays;

class Main{
    public static void main(String[] a){
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        int[] inputs = new int[3];

        String result;
        for(int i = 0;i < n;i++) {
            for (int j = 0; j < 3; j++) {
                int m = s.nextInt();
                inputs[j] = m * m;
            }
            Arrays.sort(inputs);
            result = inputs[0] + inputs[1] == inputs[2] ? "YES" : "NO";

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