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

public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int num = scanner.nextInt();
        for (int i = 0; i < num; i++) {
            int a = scanner.nextInt();
            int b = scanner.nextInt();
            int c = scanner.nextInt();

            if (isRightTriAngle(a, b, c)) {
                System.out.println("YES");
            } else {
                System.out.println("NO");
            }
        }
    }

    static boolean isRightTriAngle(int side_a, int side_b, int side_c) {
        int[] sides = { side_a, side_b, side_c };
        Arrays.sort(sides);

        int a_2 = (int)Math.pow(sides[0], 2);
        int b_2 = (int)Math.pow(sides[1], 2);
        int c_2 = (int)Math.pow(sides[2], 2);

        return a_2 + b_2 == c_2;
    }

} import java.util.Scanner; Scanner java.util import java.util.Arrays; Arrays java.util public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int num = scanner.nextInt();
        for (int i = 0; i < num; i++) {
            int a = scanner.nextInt();
            int b = scanner.nextInt();
            int c = scanner.nextInt();

            if (isRightTriAngle(a, b, c)) {
                System.out.println("YES");
            } else {
                System.out.println("NO");
            }
        }
    }

    static boolean isRightTriAngle(int side_a, int side_b, int side_c) {
        int[] sides = { side_a, side_b, side_c };
        Arrays.sort(sides);

        int a_2 = (int)Math.pow(sides[0], 2);
        int b_2 = (int)Math.pow(sides[1], 2);
        int c_2 = (int)Math.pow(sides[2], 2);

        return a_2 + b_2 == c_2;
    }

} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int num = scanner.nextInt();
        for (int i = 0; i < num; i++) {
            int a = scanner.nextInt();
            int b = scanner.nextInt();
            int c = scanner.nextInt();

            if (isRightTriAngle(a, b, c)) {
                System.out.println("YES");
            } else {
                System.out.println("NO");
            }
        }
    } main {
        Scanner scanner = new Scanner(System.in);

        int num = scanner.nextInt();
        for (int i = 0; i < num; i++) {
            int a = scanner.nextInt();
            int b = scanner.nextInt();
            int c = scanner.nextInt();

            if (isRightTriAngle(a, b, c)) {
                System.out.println("YES");
            } else {
                System.out.println("NO");
            }
        }
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int num = scanner.nextInt(); num scanner.nextInt() scanner.nextInt scanner for (int i = 0; i < num; i++) {
            int a = scanner.nextInt();
            int b = scanner.nextInt();
            int c = scanner.nextInt();

            if (isRightTriAngle(a, b, c)) {
                System.out.println("YES");
            } else {
                System.out.println("NO");
            }
        } int i = 0; int i = 0; i 0 i < num i num i++ i++ i {
            int a = scanner.nextInt();
            int b = scanner.nextInt();
            int c = scanner.nextInt();

            if (isRightTriAngle(a, b, c)) {
                System.out.println("YES");
            } else {
                System.out.println("NO");
            }
        } {
            int a = scanner.nextInt();
            int b = scanner.nextInt();
            int c = scanner.nextInt();

            if (isRightTriAngle(a, b, c)) {
                System.out.println("YES");
            } else {
                System.out.println("NO");
            }
        } int a = scanner.nextInt(); a scanner.nextInt() scanner.nextInt scanner int b = scanner.nextInt(); b scanner.nextInt() scanner.nextInt scanner int c = scanner.nextInt(); c scanner.nextInt() scanner.nextInt scanner if (isRightTriAngle(a, b, c)) {
                System.out.println("YES");
            } else {
                System.out.println("NO");
            } isRightTriAngle(a, b, c) isRightTriAngle a b c {
                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 static boolean isRightTriAngle(int side_a, int side_b, int side_c) {
        int[] sides = { side_a, side_b, side_c };
        Arrays.sort(sides);

        int a_2 = (int)Math.pow(sides[0], 2);
        int b_2 = (int)Math.pow(sides[1], 2);
        int c_2 = (int)Math.pow(sides[2], 2);

        return a_2 + b_2 == c_2;
    } isRightTriAngle {
        int[] sides = { side_a, side_b, side_c };
        Arrays.sort(sides);

        int a_2 = (int)Math.pow(sides[0], 2);
        int b_2 = (int)Math.pow(sides[1], 2);
        int c_2 = (int)Math.pow(sides[2], 2);

        return a_2 + b_2 == c_2;
    } int[] sides = { side_a, side_b, side_c }; sides { side_a, side_b, side_c } side_a side_b side_c Arrays.sort(sides) Arrays.sort Arrays sides int a_2 = (int)Math.pow(sides[0], 2); a_2 (int)Math.pow(sides[0], 2) Math.pow Math sides[0] sides 0 2 int b_2 = (int)Math.pow(sides[1], 2); b_2 (int)Math.pow(sides[1], 2) Math.pow Math sides[1] sides 1 2 int c_2 = (int)Math.pow(sides[2], 2); c_2 (int)Math.pow(sides[2], 2) Math.pow Math sides[2] sides 2 2 return a_2 + b_2 == c_2; a_2 + b_2 == c_2 a_2 + b_2 a_2 b_2 c_2 int side_a side_a int side_b side_b int side_c side_c public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int num = scanner.nextInt();
        for (int i = 0; i < num; i++) {
            int a = scanner.nextInt();
            int b = scanner.nextInt();
            int c = scanner.nextInt();

            if (isRightTriAngle(a, b, c)) {
                System.out.println("YES");
            } else {
                System.out.println("NO");
            }
        }
    }

    static boolean isRightTriAngle(int side_a, int side_b, int side_c) {
        int[] sides = { side_a, side_b, side_c };
        Arrays.sort(sides);

        int a_2 = (int)Math.pow(sides[0], 2);
        int b_2 = (int)Math.pow(sides[1], 2);
        int c_2 = (int)Math.pow(sides[2], 2);

        return a_2 + b_2 == c_2;
    }

} public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int num = scanner.nextInt();
        for (int i = 0; i < num; i++) {
            int a = scanner.nextInt();
            int b = scanner.nextInt();
            int c = scanner.nextInt();

            if (isRightTriAngle(a, b, c)) {
                System.out.println("YES");
            } else {
                System.out.println("NO");
            }
        }
    }

    static boolean isRightTriAngle(int side_a, int side_b, int side_c) {
        int[] sides = { side_a, side_b, side_c };
        Arrays.sort(sides);

        int a_2 = (int)Math.pow(sides[0], 2);
        int b_2 = (int)Math.pow(sides[1], 2);
        int c_2 = (int)Math.pow(sides[2], 2);

        return a_2 + b_2 == c_2;
    }

} Main
import java.util.Scanner;
import java.util.Arrays;

public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int num = scanner.nextInt();
        for (int i = 0; i < num; i++) {
            int a = scanner.nextInt();
            int b = scanner.nextInt();
            int c = scanner.nextInt();

            if (isRightTriAngle(a, b, c)) {
                System.out.println("YES");
            } else {
                System.out.println("NO");
            }
        }
    }

    static boolean isRightTriAngle(int side_a, int side_b, int side_c) {
        int[] sides = { side_a, side_b, side_c };
        Arrays.sort(sides);

        int a_2 = (int)Math.pow(sides[0], 2);
        int b_2 = (int)Math.pow(sides[1], 2);
        int c_2 = (int)Math.pow(sides[2], 2);

        return a_2 + b_2 == c_2;
    }

}