import java.util.Scanner;

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

        int N = Integer.parseInt(sc.next());

        for (int i = 0; i < N; i++) {
            int a = Integer.parseInt(sc.next());
            int b = Integer.parseInt(sc.next());
            int c = Integer.parseInt(sc.next());

            if (a < b) {
                a ^= b;
                b ^= a;
                a ^= b;
            }

            if (a < c) {
                a ^= c;
                c ^= a;
                a ^= c;
            }

            if (Math.pow(a, 2) == (Math.pow(b, 2) + Math.pow(c, 2))) {
                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 sc = new Scanner(System.in);

        int N = Integer.parseInt(sc.next());

        for (int i = 0; i < N; i++) {
            int a = Integer.parseInt(sc.next());
            int b = Integer.parseInt(sc.next());
            int c = Integer.parseInt(sc.next());

            if (a < b) {
                a ^= b;
                b ^= a;
                a ^= b;
            }

            if (a < c) {
                a ^= c;
                c ^= a;
                a ^= c;
            }

            if (Math.pow(a, 2) == (Math.pow(b, 2) + Math.pow(c, 2))) {
                System.out.println("YES");
            } else {
                System.out.println("NO");
            }
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int N = Integer.parseInt(sc.next());

        for (int i = 0; i < N; i++) {
            int a = Integer.parseInt(sc.next());
            int b = Integer.parseInt(sc.next());
            int c = Integer.parseInt(sc.next());

            if (a < b) {
                a ^= b;
                b ^= a;
                a ^= b;
            }

            if (a < c) {
                a ^= c;
                c ^= a;
                a ^= c;
            }

            if (Math.pow(a, 2) == (Math.pow(b, 2) + Math.pow(c, 2))) {
                System.out.println("YES");
            } else {
                System.out.println("NO");
            }
        }
    } main {
        Scanner sc = new Scanner(System.in);

        int N = Integer.parseInt(sc.next());

        for (int i = 0; i < N; i++) {
            int a = Integer.parseInt(sc.next());
            int b = Integer.parseInt(sc.next());
            int c = Integer.parseInt(sc.next());

            if (a < b) {
                a ^= b;
                b ^= a;
                a ^= b;
            }

            if (a < c) {
                a ^= c;
                c ^= a;
                a ^= c;
            }

            if (Math.pow(a, 2) == (Math.pow(b, 2) + Math.pow(c, 2))) {
                System.out.println("YES");
            } else {
                System.out.println("NO");
            }
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = Integer.parseInt(sc.next()); N Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc for (int i = 0; i < N; i++) {
            int a = Integer.parseInt(sc.next());
            int b = Integer.parseInt(sc.next());
            int c = Integer.parseInt(sc.next());

            if (a < b) {
                a ^= b;
                b ^= a;
                a ^= b;
            }

            if (a < c) {
                a ^= c;
                c ^= a;
                a ^= c;
            }

            if (Math.pow(a, 2) == (Math.pow(b, 2) + Math.pow(c, 2))) {
                System.out.println("YES");
            } else {
                System.out.println("NO");
            }
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            int a = Integer.parseInt(sc.next());
            int b = Integer.parseInt(sc.next());
            int c = Integer.parseInt(sc.next());

            if (a < b) {
                a ^= b;
                b ^= a;
                a ^= b;
            }

            if (a < c) {
                a ^= c;
                c ^= a;
                a ^= c;
            }

            if (Math.pow(a, 2) == (Math.pow(b, 2) + Math.pow(c, 2))) {
                System.out.println("YES");
            } else {
                System.out.println("NO");
            }
        } {
            int a = Integer.parseInt(sc.next());
            int b = Integer.parseInt(sc.next());
            int c = Integer.parseInt(sc.next());

            if (a < b) {
                a ^= b;
                b ^= a;
                a ^= b;
            }

            if (a < c) {
                a ^= c;
                c ^= a;
                a ^= c;
            }

            if (Math.pow(a, 2) == (Math.pow(b, 2) + Math.pow(c, 2))) {
                System.out.println("YES");
            } else {
                System.out.println("NO");
            }
        } int a = Integer.parseInt(sc.next()); a Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int b = Integer.parseInt(sc.next()); b Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int c = Integer.parseInt(sc.next()); c Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc if (a < b) {
                a ^= b;
                b ^= a;
                a ^= b;
            } a < b a b {
                a ^= b;
                b ^= a;
                a ^= b;
            } a ^= b a b b ^= a b a a ^= b a b if (a < c) {
                a ^= c;
                c ^= a;
                a ^= c;
            } a < c a c {
                a ^= c;
                c ^= a;
                a ^= c;
            } a ^= c a c c ^= a c a a ^= c a c if (Math.pow(a, 2) == (Math.pow(b, 2) + Math.pow(c, 2))) {
                System.out.println("YES");
            } else {
                System.out.println("NO");
            } Math.pow(a, 2) == (Math.pow(b, 2) + Math.pow(c, 2)) Math.pow(a, 2) Math.pow Math a 2 (Math.pow(b, 2) + Math.pow(c, 2)) Math.pow(b, 2) Math.pow Math b 2 Math.pow(c, 2) Math.pow Math c 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 N = Integer.parseInt(sc.next());

        for (int i = 0; i < N; i++) {
            int a = Integer.parseInt(sc.next());
            int b = Integer.parseInt(sc.next());
            int c = Integer.parseInt(sc.next());

            if (a < b) {
                a ^= b;
                b ^= a;
                a ^= b;
            }

            if (a < c) {
                a ^= c;
                c ^= a;
                a ^= c;
            }

            if (Math.pow(a, 2) == (Math.pow(b, 2) + Math.pow(c, 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 N = Integer.parseInt(sc.next());

        for (int i = 0; i < N; i++) {
            int a = Integer.parseInt(sc.next());
            int b = Integer.parseInt(sc.next());
            int c = Integer.parseInt(sc.next());

            if (a < b) {
                a ^= b;
                b ^= a;
                a ^= b;
            }

            if (a < c) {
                a ^= c;
                c ^= a;
                a ^= c;
            }

            if (Math.pow(a, 2) == (Math.pow(b, 2) + Math.pow(c, 2))) {
                System.out.println("YES");
            } else {
                System.out.println("NO");
            }
        }
    }
} Main
import java.util.Scanner;

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

        int N = Integer.parseInt(sc.next());

        for (int i = 0; i < N; i++) {
            int a = Integer.parseInt(sc.next());
            int b = Integer.parseInt(sc.next());
            int c = Integer.parseInt(sc.next());

            if (a < b) {
                a ^= b;
                b ^= a;
                a ^= b;
            }

            if (a < c) {
                a ^= c;
                c ^= a;
                a ^= c;
            }

            if (Math.pow(a, 2) == (Math.pow(b, 2) + Math.pow(c, 2))) {
                System.out.println("YES");
            } else {
                System.out.println("NO");
            }
        }
    }
}