import java.util.Arrays;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int count = Integer.valueOf(sc.next());

        for (int i = 0; i < count; i++) {
            int[] nums = new int[]{
                    Integer.valueOf(sc.next()),
                    Integer.valueOf(sc.next()),
                    Integer.valueOf(sc.next())
            };
            Arrays.sort(nums);
            System.out.println(isRightTriangle(nums) ? "YES" : "NO");
        }
    }

    public static boolean isRightTriangle(int[] nums) {
        return (nums[0] * nums[0]) + (nums[1] * nums[1]) == (nums[2] * nums[2]);
    }
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int count = Integer.valueOf(sc.next());

        for (int i = 0; i < count; i++) {
            int[] nums = new int[]{
                    Integer.valueOf(sc.next()),
                    Integer.valueOf(sc.next()),
                    Integer.valueOf(sc.next())
            };
            Arrays.sort(nums);
            System.out.println(isRightTriangle(nums) ? "YES" : "NO");
        }
    }

    public static boolean isRightTriangle(int[] nums) {
        return (nums[0] * nums[0]) + (nums[1] * nums[1]) == (nums[2] * nums[2]);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int count = Integer.valueOf(sc.next());

        for (int i = 0; i < count; i++) {
            int[] nums = new int[]{
                    Integer.valueOf(sc.next()),
                    Integer.valueOf(sc.next()),
                    Integer.valueOf(sc.next())
            };
            Arrays.sort(nums);
            System.out.println(isRightTriangle(nums) ? "YES" : "NO");
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int count = Integer.valueOf(sc.next());

        for (int i = 0; i < count; i++) {
            int[] nums = new int[]{
                    Integer.valueOf(sc.next()),
                    Integer.valueOf(sc.next()),
                    Integer.valueOf(sc.next())
            };
            Arrays.sort(nums);
            System.out.println(isRightTriangle(nums) ? "YES" : "NO");
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int count = Integer.valueOf(sc.next()); count Integer.valueOf(sc.next()) Integer.valueOf Integer sc.next() sc.next sc for (int i = 0; i < count; i++) {
            int[] nums = new int[]{
                    Integer.valueOf(sc.next()),
                    Integer.valueOf(sc.next()),
                    Integer.valueOf(sc.next())
            };
            Arrays.sort(nums);
            System.out.println(isRightTriangle(nums) ? "YES" : "NO");
        } int i = 0; int i = 0; i 0 i < count i count i++ i++ i {
            int[] nums = new int[]{
                    Integer.valueOf(sc.next()),
                    Integer.valueOf(sc.next()),
                    Integer.valueOf(sc.next())
            };
            Arrays.sort(nums);
            System.out.println(isRightTriangle(nums) ? "YES" : "NO");
        } {
            int[] nums = new int[]{
                    Integer.valueOf(sc.next()),
                    Integer.valueOf(sc.next()),
                    Integer.valueOf(sc.next())
            };
            Arrays.sort(nums);
            System.out.println(isRightTriangle(nums) ? "YES" : "NO");
        } int[] nums = new int[]{
                    Integer.valueOf(sc.next()),
                    Integer.valueOf(sc.next()),
                    Integer.valueOf(sc.next())
            }; nums new int[]{
                    Integer.valueOf(sc.next()),
                    Integer.valueOf(sc.next()),
                    Integer.valueOf(sc.next())
            } Arrays.sort(nums) Arrays.sort Arrays nums System.out.println(isRightTriangle(nums) ? "YES" : "NO") System.out.println System.out System System.out isRightTriangle(nums) ? "YES" : "NO" isRightTriangle(nums) isRightTriangle nums "YES" "NO" String[] args args public static boolean isRightTriangle(int[] nums) {
        return (nums[0] * nums[0]) + (nums[1] * nums[1]) == (nums[2] * nums[2]);
    } isRightTriangle {
        return (nums[0] * nums[0]) + (nums[1] * nums[1]) == (nums[2] * nums[2]);
    } return (nums[0] * nums[0]) + (nums[1] * nums[1]) == (nums[2] * nums[2]); (nums[0] * nums[0]) + (nums[1] * nums[1]) == (nums[2] * nums[2]) (nums[0] * nums[0]) + (nums[1] * nums[1]) (nums[0] * nums[0]) nums[0] nums 0 nums[0] nums 0 (nums[1] * nums[1]) nums[1] nums 1 nums[1] nums 1 (nums[2] * nums[2]) nums[2] nums 2 nums[2] nums 2 int[] nums nums public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int count = Integer.valueOf(sc.next());

        for (int i = 0; i < count; i++) {
            int[] nums = new int[]{
                    Integer.valueOf(sc.next()),
                    Integer.valueOf(sc.next()),
                    Integer.valueOf(sc.next())
            };
            Arrays.sort(nums);
            System.out.println(isRightTriangle(nums) ? "YES" : "NO");
        }
    }

    public static boolean isRightTriangle(int[] nums) {
        return (nums[0] * nums[0]) + (nums[1] * nums[1]) == (nums[2] * nums[2]);
    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int count = Integer.valueOf(sc.next());

        for (int i = 0; i < count; i++) {
            int[] nums = new int[]{
                    Integer.valueOf(sc.next()),
                    Integer.valueOf(sc.next()),
                    Integer.valueOf(sc.next())
            };
            Arrays.sort(nums);
            System.out.println(isRightTriangle(nums) ? "YES" : "NO");
        }
    }

    public static boolean isRightTriangle(int[] nums) {
        return (nums[0] * nums[0]) + (nums[1] * nums[1]) == (nums[2] * nums[2]);
    }
} Main
import java.util.Arrays;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int count = Integer.valueOf(sc.next());

        for (int i = 0; i < count; i++) {
            int[] nums = new int[]{
                    Integer.valueOf(sc.next()),
                    Integer.valueOf(sc.next()),
                    Integer.valueOf(sc.next())
            };
            Arrays.sort(nums);
            System.out.println(isRightTriangle(nums) ? "YES" : "NO");
        }
    }

    public static boolean isRightTriangle(int[] nums) {
        return (nums[0] * nums[0]) + (nums[1] * nums[1]) == (nums[2] * nums[2]);
    }
}