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

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        while (n-- > 0) {
            int[] list = { sc.nextInt(), sc.nextInt(), sc.nextInt() };
            Arrays.sort(list);
            System.out.println(list[0] * list[0] + list[1] * list[1] == list[2] * list[2] ? "YES" : "NO");
        }
        sc.close();
    }
} 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 n = sc.nextInt();
        while (n-- > 0) {
            int[] list = { sc.nextInt(), sc.nextInt(), sc.nextInt() };
            Arrays.sort(list);
            System.out.println(list[0] * list[0] + list[1] * list[1] == list[2] * list[2] ? "YES" : "NO");
        }
        sc.close();
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        while (n-- > 0) {
            int[] list = { sc.nextInt(), sc.nextInt(), sc.nextInt() };
            Arrays.sort(list);
            System.out.println(list[0] * list[0] + list[1] * list[1] == list[2] * list[2] ? "YES" : "NO");
        }
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        while (n-- > 0) {
            int[] list = { sc.nextInt(), sc.nextInt(), sc.nextInt() };
            Arrays.sort(list);
            System.out.println(list[0] * list[0] + list[1] * list[1] == list[2] * list[2] ? "YES" : "NO");
        }
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc while (n-- > 0) {
            int[] list = { sc.nextInt(), sc.nextInt(), sc.nextInt() };
            Arrays.sort(list);
            System.out.println(list[0] * list[0] + list[1] * list[1] == list[2] * list[2] ? "YES" : "NO");
        } n-- > 0 n-- n 0 {
            int[] list = { sc.nextInt(), sc.nextInt(), sc.nextInt() };
            Arrays.sort(list);
            System.out.println(list[0] * list[0] + list[1] * list[1] == list[2] * list[2] ? "YES" : "NO");
        } int[] list = { sc.nextInt(), sc.nextInt(), sc.nextInt() }; list { sc.nextInt(), sc.nextInt(), sc.nextInt() } sc.nextInt() sc.nextInt sc sc.nextInt() sc.nextInt sc sc.nextInt() sc.nextInt sc Arrays.sort(list) Arrays.sort Arrays list System.out.println(list[0] * list[0] + list[1] * list[1] == list[2] * list[2] ? "YES" : "NO") System.out.println System.out System System.out list[0] * list[0] + list[1] * list[1] == list[2] * list[2] ? "YES" : "NO" list[0] * list[0] + list[1] * list[1] == list[2] * list[2] list[0] * list[0] + list[1] * list[1] list[0] * list[0] list[0] list 0 list[0] list 0 list[1] * list[1] list[1] list 1 list[1] list 1 list[2] * list[2] list[2] list 2 list[2] list 2 "YES" "NO" sc.close() sc.close sc String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        while (n-- > 0) {
            int[] list = { sc.nextInt(), sc.nextInt(), sc.nextInt() };
            Arrays.sort(list);
            System.out.println(list[0] * list[0] + list[1] * list[1] == list[2] * list[2] ? "YES" : "NO");
        }
        sc.close();
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        while (n-- > 0) {
            int[] list = { sc.nextInt(), sc.nextInt(), sc.nextInt() };
            Arrays.sort(list);
            System.out.println(list[0] * list[0] + list[1] * list[1] == list[2] * list[2] ? "YES" : "NO");
        }
        sc.close();
    }
} 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 n = sc.nextInt();
        while (n-- > 0) {
            int[] list = { sc.nextInt(), sc.nextInt(), sc.nextInt() };
            Arrays.sort(list);
            System.out.println(list[0] * list[0] + list[1] * list[1] == list[2] * list[2] ? "YES" : "NO");
        }
        sc.close();
    }
}
