import java.util.Scanner;

class Main {
    private void rightTriangle() {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        while (n-- != 0) {
            int a = sc.nextInt();
            int b = sc.nextInt();
            int c = sc.nextInt();
            if (a * a + b * b == c * c ||
                b * b + c * c == a * a ||
                c * c + a * a == b * b )
                System.out.println("YES");
            else
                System.out.println("NO");
        }
    }

    public static void main(String[] args) {
        (new Main()).rightTriangle();
    }
} import java.util.Scanner; Scanner java.util class Main {
    private void rightTriangle() {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        while (n-- != 0) {
            int a = sc.nextInt();
            int b = sc.nextInt();
            int c = sc.nextInt();
            if (a * a + b * b == c * c ||
                b * b + c * c == a * a ||
                c * c + a * a == b * b )
                System.out.println("YES");
            else
                System.out.println("NO");
        }
    }

    public static void main(String[] args) {
        (new Main()).rightTriangle();
    }
} Main private void rightTriangle() {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        while (n-- != 0) {
            int a = sc.nextInt();
            int b = sc.nextInt();
            int c = sc.nextInt();
            if (a * a + b * b == c * c ||
                b * b + c * c == a * a ||
                c * c + a * a == b * b )
                System.out.println("YES");
            else
                System.out.println("NO");
        }
    } rightTriangle {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        while (n-- != 0) {
            int a = sc.nextInt();
            int b = sc.nextInt();
            int c = sc.nextInt();
            if (a * a + b * b == c * c ||
                b * b + c * c == a * a ||
                c * c + a * a == b * b )
                System.out.println("YES");
            else
                System.out.println("NO");
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc while (n-- != 0) {
            int a = sc.nextInt();
            int b = sc.nextInt();
            int c = sc.nextInt();
            if (a * a + b * b == c * c ||
                b * b + c * c == a * a ||
                c * c + a * a == b * b )
                System.out.println("YES");
            else
                System.out.println("NO");
        } n-- != 0 n-- n 0 {
            int a = sc.nextInt();
            int b = sc.nextInt();
            int c = sc.nextInt();
            if (a * a + b * b == c * c ||
                b * b + c * c == a * a ||
                c * c + a * a == b * b )
                System.out.println("YES");
            else
                System.out.println("NO");
        } int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc int c = sc.nextInt(); c sc.nextInt() sc.nextInt sc if (a * a + b * b == c * c ||
                b * b + c * c == a * a ||
                c * c + a * a == b * b )
                System.out.println("YES");
            else
                System.out.println("NO"); a * a + b * b == c * c ||
                b * b + c * c == a * a ||
                c * c + a * a == b * b a * a + b * b == c * c ||
                b * b + c * c == a * a ||
                c * c + a * a == b * b a * a + b * b == c * c a * a + b * b a * a a a b * b b b c * c c c b * b + c * c == a * a b * b + c * c b * b b b c * c c c a * a a a c * c + a * a == b * b c * c + a * a c * c c c a * a a a b * b b b System.out.println("YES") System.out.println System.out System System.out "YES" System.out.println("NO") System.out.println System.out System System.out "NO" public static void main(String[] args) {
        (new Main()).rightTriangle();
    } main {
        (new Main()).rightTriangle();
    } (new Main()).rightTriangle() (new Main()).rightTriangle (new Main()) String[] args args
import java.util.Scanner;

class Main {
    private void rightTriangle() {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        while (n-- != 0) {
            int a = sc.nextInt();
            int b = sc.nextInt();
            int c = sc.nextInt();
            if (a * a + b * b == c * c ||
                b * b + c * c == a * a ||
                c * c + a * a == b * b )
                System.out.println("YES");
            else
                System.out.println("NO");
        }
    }

    public static void main(String[] args) {
        (new Main()).rightTriangle();
    }
}