import java.util.*;

public class Main {
    private static final Scanner scn = new Scanner(System.in);
    
    public static void main(String[] args) {
        for(int i = 0, n = scn.nextInt(); i < n; i++) {
            int[] ary = {scn.nextInt(), scn.nextInt(), scn.nextInt()};
            Arrays.sort(ary);
            boolean flg = ary[0] * ary[0] + ary[1] * ary[1] == ary[2] * ary[2];
            System.out.println(flg ? "YES" : "NO");
        }
    }
} import java.util.*; util.* java public class Main {
    private static final Scanner scn = new Scanner(System.in);
    
    public static void main(String[] args) {
        for(int i = 0, n = scn.nextInt(); i < n; i++) {
            int[] ary = {scn.nextInt(), scn.nextInt(), scn.nextInt()};
            Arrays.sort(ary);
            boolean flg = ary[0] * ary[0] + ary[1] * ary[1] == ary[2] * ary[2];
            System.out.println(flg ? "YES" : "NO");
        }
    }
} Main private static final Scanner scn = new Scanner(System.in); scn new Scanner(System.in) public static void main(String[] args) {
        for(int i = 0, n = scn.nextInt(); i < n; i++) {
            int[] ary = {scn.nextInt(), scn.nextInt(), scn.nextInt()};
            Arrays.sort(ary);
            boolean flg = ary[0] * ary[0] + ary[1] * ary[1] == ary[2] * ary[2];
            System.out.println(flg ? "YES" : "NO");
        }
    } main {
        for(int i = 0, n = scn.nextInt(); i < n; i++) {
            int[] ary = {scn.nextInt(), scn.nextInt(), scn.nextInt()};
            Arrays.sort(ary);
            boolean flg = ary[0] * ary[0] + ary[1] * ary[1] == ary[2] * ary[2];
            System.out.println(flg ? "YES" : "NO");
        }
    } for(int i = 0, n = scn.nextInt(); i < n; i++) {
            int[] ary = {scn.nextInt(), scn.nextInt(), scn.nextInt()};
            Arrays.sort(ary);
            boolean flg = ary[0] * ary[0] + ary[1] * ary[1] == ary[2] * ary[2];
            System.out.println(flg ? "YES" : "NO");
        } int i = 0, n = scn.nextInt(); int i = 0 i 0 n = scn.nextInt(); n scn.nextInt() scn.nextInt scn i < n i n i++ i++ i {
            int[] ary = {scn.nextInt(), scn.nextInt(), scn.nextInt()};
            Arrays.sort(ary);
            boolean flg = ary[0] * ary[0] + ary[1] * ary[1] == ary[2] * ary[2];
            System.out.println(flg ? "YES" : "NO");
        } {
            int[] ary = {scn.nextInt(), scn.nextInt(), scn.nextInt()};
            Arrays.sort(ary);
            boolean flg = ary[0] * ary[0] + ary[1] * ary[1] == ary[2] * ary[2];
            System.out.println(flg ? "YES" : "NO");
        } int[] ary = {scn.nextInt(), scn.nextInt(), scn.nextInt()}; ary {scn.nextInt(), scn.nextInt(), scn.nextInt()} scn.nextInt() scn.nextInt scn scn.nextInt() scn.nextInt scn scn.nextInt() scn.nextInt scn Arrays.sort(ary) Arrays.sort Arrays ary boolean flg = ary[0] * ary[0] + ary[1] * ary[1] == ary[2] * ary[2]; flg ary[0] * ary[0] + ary[1] * ary[1] == ary[2] * ary[2] ary[0] * ary[0] + ary[1] * ary[1] ary[0] * ary[0] ary[0] ary 0 ary[0] ary 0 ary[1] * ary[1] ary[1] ary 1 ary[1] ary 1 ary[2] * ary[2] ary[2] ary 2 ary[2] ary 2 System.out.println(flg ? "YES" : "NO") System.out.println System.out System System.out flg ? "YES" : "NO" flg "YES" "NO" String[] args args public class Main {
    private static final Scanner scn = new Scanner(System.in);
    
    public static void main(String[] args) {
        for(int i = 0, n = scn.nextInt(); i < n; i++) {
            int[] ary = {scn.nextInt(), scn.nextInt(), scn.nextInt()};
            Arrays.sort(ary);
            boolean flg = ary[0] * ary[0] + ary[1] * ary[1] == ary[2] * ary[2];
            System.out.println(flg ? "YES" : "NO");
        }
    }
} public class Main {
    private static final Scanner scn = new Scanner(System.in);
    
    public static void main(String[] args) {
        for(int i = 0, n = scn.nextInt(); i < n; i++) {
            int[] ary = {scn.nextInt(), scn.nextInt(), scn.nextInt()};
            Arrays.sort(ary);
            boolean flg = ary[0] * ary[0] + ary[1] * ary[1] == ary[2] * ary[2];
            System.out.println(flg ? "YES" : "NO");
        }
    }
} Main
import java.util.*;

public class Main {
    private static final Scanner scn = new Scanner(System.in);
    
    public static void main(String[] args) {
        for(int i = 0, n = scn.nextInt(); i < n; i++) {
            int[] ary = {scn.nextInt(), scn.nextInt(), scn.nextInt()};
            Arrays.sort(ary);
            boolean flg = ary[0] * ary[0] + ary[1] * ary[1] == ary[2] * ary[2];
            System.out.println(flg ? "YES" : "NO");
        }
    }
}