import java.util.Scanner;

class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int[] data = new int[3];
        while (scan.hasNext()) {
            int n=scan.nextInt();
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < 3; j++) {
                    data[j] = scan.nextInt();
                }
                for (int j = 0; j < 2; j++) {
                    for (int k = j + 1; k < 3; k++) {
                        if (data[j] < data[k]) {
                            int tmp;
                            tmp = data[j];
                            data[j] = data[k];
                            data[k] = tmp;
                        }
                    }
                }
                if (data[0] * data[0] == data[1] * data[1] + data[2] * data[2])
                    System.out.println("YES");
                else
                    System.out.println("NO");
            }
        }
    }
} import java.util.Scanner; Scanner java.util class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int[] data = new int[3];
        while (scan.hasNext()) {
            int n=scan.nextInt();
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < 3; j++) {
                    data[j] = scan.nextInt();
                }
                for (int j = 0; j < 2; j++) {
                    for (int k = j + 1; k < 3; k++) {
                        if (data[j] < data[k]) {
                            int tmp;
                            tmp = data[j];
                            data[j] = data[k];
                            data[k] = tmp;
                        }
                    }
                }
                if (data[0] * data[0] == data[1] * data[1] + data[2] * data[2])
                    System.out.println("YES");
                else
                    System.out.println("NO");
            }
        }
    }
} Main public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int[] data = new int[3];
        while (scan.hasNext()) {
            int n=scan.nextInt();
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < 3; j++) {
                    data[j] = scan.nextInt();
                }
                for (int j = 0; j < 2; j++) {
                    for (int k = j + 1; k < 3; k++) {
                        if (data[j] < data[k]) {
                            int tmp;
                            tmp = data[j];
                            data[j] = data[k];
                            data[k] = tmp;
                        }
                    }
                }
                if (data[0] * data[0] == data[1] * data[1] + data[2] * data[2])
                    System.out.println("YES");
                else
                    System.out.println("NO");
            }
        }
    } main {
        Scanner scan = new Scanner(System.in);
        int[] data = new int[3];
        while (scan.hasNext()) {
            int n=scan.nextInt();
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < 3; j++) {
                    data[j] = scan.nextInt();
                }
                for (int j = 0; j < 2; j++) {
                    for (int k = j + 1; k < 3; k++) {
                        if (data[j] < data[k]) {
                            int tmp;
                            tmp = data[j];
                            data[j] = data[k];
                            data[k] = tmp;
                        }
                    }
                }
                if (data[0] * data[0] == data[1] * data[1] + data[2] * data[2])
                    System.out.println("YES");
                else
                    System.out.println("NO");
            }
        }
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int[] data = new int[3]; data new int[3] 3 while (scan.hasNext()) {
            int n=scan.nextInt();
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < 3; j++) {
                    data[j] = scan.nextInt();
                }
                for (int j = 0; j < 2; j++) {
                    for (int k = j + 1; k < 3; k++) {
                        if (data[j] < data[k]) {
                            int tmp;
                            tmp = data[j];
                            data[j] = data[k];
                            data[k] = tmp;
                        }
                    }
                }
                if (data[0] * data[0] == data[1] * data[1] + data[2] * data[2])
                    System.out.println("YES");
                else
                    System.out.println("NO");
            }
        } scan.hasNext() scan.hasNext scan {
            int n=scan.nextInt();
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < 3; j++) {
                    data[j] = scan.nextInt();
                }
                for (int j = 0; j < 2; j++) {
                    for (int k = j + 1; k < 3; k++) {
                        if (data[j] < data[k]) {
                            int tmp;
                            tmp = data[j];
                            data[j] = data[k];
                            data[k] = tmp;
                        }
                    }
                }
                if (data[0] * data[0] == data[1] * data[1] + data[2] * data[2])
                    System.out.println("YES");
                else
                    System.out.println("NO");
            }
        } int n=scan.nextInt(); n scan.nextInt() scan.nextInt scan for (int i = 0; i < n; i++) {
                for (int j = 0; j < 3; j++) {
                    data[j] = scan.nextInt();
                }
                for (int j = 0; j < 2; j++) {
                    for (int k = j + 1; k < 3; k++) {
                        if (data[j] < data[k]) {
                            int tmp;
                            tmp = data[j];
                            data[j] = data[k];
                            data[k] = tmp;
                        }
                    }
                }
                if (data[0] * data[0] == data[1] * data[1] + data[2] * data[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 {
                for (int j = 0; j < 3; j++) {
                    data[j] = scan.nextInt();
                }
                for (int j = 0; j < 2; j++) {
                    for (int k = j + 1; k < 3; k++) {
                        if (data[j] < data[k]) {
                            int tmp;
                            tmp = data[j];
                            data[j] = data[k];
                            data[k] = tmp;
                        }
                    }
                }
                if (data[0] * data[0] == data[1] * data[1] + data[2] * data[2])
                    System.out.println("YES");
                else
                    System.out.println("NO");
            } {
                for (int j = 0; j < 3; j++) {
                    data[j] = scan.nextInt();
                }
                for (int j = 0; j < 2; j++) {
                    for (int k = j + 1; k < 3; k++) {
                        if (data[j] < data[k]) {
                            int tmp;
                            tmp = data[j];
                            data[j] = data[k];
                            data[k] = tmp;
                        }
                    }
                }
                if (data[0] * data[0] == data[1] * data[1] + data[2] * data[2])
                    System.out.println("YES");
                else
                    System.out.println("NO");
            } for (int j = 0; j < 3; j++) {
                    data[j] = scan.nextInt();
                } int j = 0; int j = 0; j 0 j < 3 j 3 j++ j++ j {
                    data[j] = scan.nextInt();
                } {
                    data[j] = scan.nextInt();
                } data[j] = scan.nextInt() data[j] data j scan.nextInt() scan.nextInt scan for (int j = 0; j < 2; j++) {
                    for (int k = j + 1; k < 3; k++) {
                        if (data[j] < data[k]) {
                            int tmp;
                            tmp = data[j];
                            data[j] = data[k];
                            data[k] = tmp;
                        }
                    }
                } int j = 0; int j = 0; j 0 j < 2 j 2 j++ j++ j {
                    for (int k = j + 1; k < 3; k++) {
                        if (data[j] < data[k]) {
                            int tmp;
                            tmp = data[j];
                            data[j] = data[k];
                            data[k] = tmp;
                        }
                    }
                } {
                    for (int k = j + 1; k < 3; k++) {
                        if (data[j] < data[k]) {
                            int tmp;
                            tmp = data[j];
                            data[j] = data[k];
                            data[k] = tmp;
                        }
                    }
                } for (int k = j + 1; k < 3; k++) {
                        if (data[j] < data[k]) {
                            int tmp;
                            tmp = data[j];
                            data[j] = data[k];
                            data[k] = tmp;
                        }
                    } int k = j + 1; int k = j + 1; k j + 1 j 1 k < 3 k 3 k++ k++ k {
                        if (data[j] < data[k]) {
                            int tmp;
                            tmp = data[j];
                            data[j] = data[k];
                            data[k] = tmp;
                        }
                    } {
                        if (data[j] < data[k]) {
                            int tmp;
                            tmp = data[j];
                            data[j] = data[k];
                            data[k] = tmp;
                        }
                    } if (data[j] < data[k]) {
                            int tmp;
                            tmp = data[j];
                            data[j] = data[k];
                            data[k] = tmp;
                        } data[j] < data[k] data[j] data j data[k] data k {
                            int tmp;
                            tmp = data[j];
                            data[j] = data[k];
                            data[k] = tmp;
                        } int tmp; tmp tmp = data[j] tmp data[j] data j data[j] = data[k] data[j] data j data[k] data k data[k] = tmp data[k] data k tmp if (data[0] * data[0] == data[1] * data[1] + data[2] * data[2])
                    System.out.println("YES");
                else
                    System.out.println("NO"); data[0] * data[0] == data[1] * data[1] + data[2] * data[2] data[0] * data[0] data[0] data 0 data[0] data 0 data[1] * data[1] + data[2] * data[2] data[1] * data[1] data[1] data 1 data[1] data 1 data[2] * data[2] data[2] data 2 data[2] data 2 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" String[] args args
import java.util.Scanner;

class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int[] data = new int[3];
        while (scan.hasNext()) {
            int n=scan.nextInt();
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < 3; j++) {
                    data[j] = scan.nextInt();
                }
                for (int j = 0; j < 2; j++) {
                    for (int k = j + 1; k < 3; k++) {
                        if (data[j] < data[k]) {
                            int tmp;
                            tmp = data[j];
                            data[j] = data[k];
                            data[k] = tmp;
                        }
                    }
                }
                if (data[0] * data[0] == data[1] * data[1] + data[2] * data[2])
                    System.out.println("YES");
                else
                    System.out.println("NO");
            }
        }
    }
}