import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.lang.Exception;
import java.lang.Integer;
import java.lang.System;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Main {
    public static void main(String[] a){
        try {
            BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
            int n = Integer.parseInt(r.readLine());
            StringTokenizer st;

            int side[] = new int[3];
            for(int i = 0; i < n; i++) {
                st = new StringTokenizer(r.readLine());
                for(int j = 0; j < 3; j++) {
                    side[j] = Integer.parseInt(st.nextToken());
                }
                Arrays.sort(side);
                if((side[0]*side[0] + side[1]*side[1]) == side[2]*side[2]) {
                    System.out.println("YES");
                } else {
                    System.out.println("NO");
                }
            }
        } catch (Exception ex) {
            System.exit(0);
        }
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.lang.Exception; Exception java.lang import java.lang.Integer; Integer java.lang import java.lang.System; System java.lang import java.util.Arrays; Arrays java.util import java.util.StringTokenizer; StringTokenizer java.util public class Main {
    public static void main(String[] a){
        try {
            BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
            int n = Integer.parseInt(r.readLine());
            StringTokenizer st;

            int side[] = new int[3];
            for(int i = 0; i < n; i++) {
                st = new StringTokenizer(r.readLine());
                for(int j = 0; j < 3; j++) {
                    side[j] = Integer.parseInt(st.nextToken());
                }
                Arrays.sort(side);
                if((side[0]*side[0] + side[1]*side[1]) == side[2]*side[2]) {
                    System.out.println("YES");
                } else {
                    System.out.println("NO");
                }
            }
        } catch (Exception ex) {
            System.exit(0);
        }
    }
} Main public static void main(String[] a){
        try {
            BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
            int n = Integer.parseInt(r.readLine());
            StringTokenizer st;

            int side[] = new int[3];
            for(int i = 0; i < n; i++) {
                st = new StringTokenizer(r.readLine());
                for(int j = 0; j < 3; j++) {
                    side[j] = Integer.parseInt(st.nextToken());
                }
                Arrays.sort(side);
                if((side[0]*side[0] + side[1]*side[1]) == side[2]*side[2]) {
                    System.out.println("YES");
                } else {
                    System.out.println("NO");
                }
            }
        } catch (Exception ex) {
            System.exit(0);
        }
    } main {
        try {
            BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
            int n = Integer.parseInt(r.readLine());
            StringTokenizer st;

            int side[] = new int[3];
            for(int i = 0; i < n; i++) {
                st = new StringTokenizer(r.readLine());
                for(int j = 0; j < 3; j++) {
                    side[j] = Integer.parseInt(st.nextToken());
                }
                Arrays.sort(side);
                if((side[0]*side[0] + side[1]*side[1]) == side[2]*side[2]) {
                    System.out.println("YES");
                } else {
                    System.out.println("NO");
                }
            }
        } catch (Exception ex) {
            System.exit(0);
        }
    } try {
            BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
            int n = Integer.parseInt(r.readLine());
            StringTokenizer st;

            int side[] = new int[3];
            for(int i = 0; i < n; i++) {
                st = new StringTokenizer(r.readLine());
                for(int j = 0; j < 3; j++) {
                    side[j] = Integer.parseInt(st.nextToken());
                }
                Arrays.sort(side);
                if((side[0]*side[0] + side[1]*side[1]) == side[2]*side[2]) {
                    System.out.println("YES");
                } else {
                    System.out.println("NO");
                }
            }
        } catch (Exception ex) {
            System.exit(0);
        } catch (Exception ex) {
            System.exit(0);
        } Exception ex {
            System.exit(0);
        } System.exit(0) System.exit System 0 {
            BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
            int n = Integer.parseInt(r.readLine());
            StringTokenizer st;

            int side[] = new int[3];
            for(int i = 0; i < n; i++) {
                st = new StringTokenizer(r.readLine());
                for(int j = 0; j < 3; j++) {
                    side[j] = Integer.parseInt(st.nextToken());
                }
                Arrays.sort(side);
                if((side[0]*side[0] + side[1]*side[1]) == side[2]*side[2]) {
                    System.out.println("YES");
                } else {
                    System.out.println("NO");
                }
            }
        } BufferedReader r = new BufferedReader(new InputStreamReader(System.in)); r new BufferedReader(new InputStreamReader(System.in)) int n = Integer.parseInt(r.readLine()); n Integer.parseInt(r.readLine()) Integer.parseInt Integer r.readLine() r.readLine r StringTokenizer st; st int side[] = new int[3]; side new int[3] 3 for(int i = 0; i < n; i++) {
                st = new StringTokenizer(r.readLine());
                for(int j = 0; j < 3; j++) {
                    side[j] = Integer.parseInt(st.nextToken());
                }
                Arrays.sort(side);
                if((side[0]*side[0] + side[1]*side[1]) == side[2]*side[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 {
                st = new StringTokenizer(r.readLine());
                for(int j = 0; j < 3; j++) {
                    side[j] = Integer.parseInt(st.nextToken());
                }
                Arrays.sort(side);
                if((side[0]*side[0] + side[1]*side[1]) == side[2]*side[2]) {
                    System.out.println("YES");
                } else {
                    System.out.println("NO");
                }
            } {
                st = new StringTokenizer(r.readLine());
                for(int j = 0; j < 3; j++) {
                    side[j] = Integer.parseInt(st.nextToken());
                }
                Arrays.sort(side);
                if((side[0]*side[0] + side[1]*side[1]) == side[2]*side[2]) {
                    System.out.println("YES");
                } else {
                    System.out.println("NO");
                }
            } st = new StringTokenizer(r.readLine()) st new StringTokenizer(r.readLine()) for(int j = 0; j < 3; j++) {
                    side[j] = Integer.parseInt(st.nextToken());
                } int j = 0; int j = 0; j 0 j < 3 j 3 j++ j++ j {
                    side[j] = Integer.parseInt(st.nextToken());
                } {
                    side[j] = Integer.parseInt(st.nextToken());
                } side[j] = Integer.parseInt(st.nextToken()) side[j] side j Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st Arrays.sort(side) Arrays.sort Arrays side if((side[0]*side[0] + side[1]*side[1]) == side[2]*side[2]) {
                    System.out.println("YES");
                } else {
                    System.out.println("NO");
                } (side[0]*side[0] + side[1]*side[1]) == side[2]*side[2] (side[0]*side[0] + side[1]*side[1]) side[0]*side[0] side[0] side 0 side[0] side 0 side[1]*side[1] side[1] side 1 side[1] side 1 side[2]*side[2] side[2] side 2 side[2] side 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[] a a public class Main {
    public static void main(String[] a){
        try {
            BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
            int n = Integer.parseInt(r.readLine());
            StringTokenizer st;

            int side[] = new int[3];
            for(int i = 0; i < n; i++) {
                st = new StringTokenizer(r.readLine());
                for(int j = 0; j < 3; j++) {
                    side[j] = Integer.parseInt(st.nextToken());
                }
                Arrays.sort(side);
                if((side[0]*side[0] + side[1]*side[1]) == side[2]*side[2]) {
                    System.out.println("YES");
                } else {
                    System.out.println("NO");
                }
            }
        } catch (Exception ex) {
            System.exit(0);
        }
    }
} public class Main {
    public static void main(String[] a){
        try {
            BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
            int n = Integer.parseInt(r.readLine());
            StringTokenizer st;

            int side[] = new int[3];
            for(int i = 0; i < n; i++) {
                st = new StringTokenizer(r.readLine());
                for(int j = 0; j < 3; j++) {
                    side[j] = Integer.parseInt(st.nextToken());
                }
                Arrays.sort(side);
                if((side[0]*side[0] + side[1]*side[1]) == side[2]*side[2]) {
                    System.out.println("YES");
                } else {
                    System.out.println("NO");
                }
            }
        } catch (Exception ex) {
            System.exit(0);
        }
    }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.lang.Exception;
import java.lang.Integer;
import java.lang.System;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Main {
    public static void main(String[] a){
        try {
            BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
            int n = Integer.parseInt(r.readLine());
            StringTokenizer st;

            int side[] = new int[3];
            for(int i = 0; i < n; i++) {
                st = new StringTokenizer(r.readLine());
                for(int j = 0; j < 3; j++) {
                    side[j] = Integer.parseInt(st.nextToken());
                }
                Arrays.sort(side);
                if((side[0]*side[0] + side[1]*side[1]) == side[2]*side[2]) {
                    System.out.println("YES");
                } else {
                    System.out.println("NO");
                }
            }
        } catch (Exception ex) {
            System.exit(0);
        }
    }
}