import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.Arrays;
import java.util.Collections;

class Main {
    public static void main (String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        StringBuilder sb = new StringBuilder("");
        int[] sides = new int[3];
        for (int i = 0; i < n; i++) {
            sides[0] = sc.nextInt();
            sides[1] = sc.nextInt();
            sides[2] = sc.nextInt();
            Arrays.sort(sides);
            sb.append((sides[2] * sides[2] == sides[1] * sides[1] + sides[0] * sides[0]) ? "YES" : "NO");
            sb.append('\n');
        }
        System.out.print(sb);
    }
} import java.io.IOException; IOException java.io import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Scanner; Scanner java.util import java.util.Arrays; Arrays java.util import java.util.Collections; Collections java.util class Main {
    public static void main (String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        StringBuilder sb = new StringBuilder("");
        int[] sides = new int[3];
        for (int i = 0; i < n; i++) {
            sides[0] = sc.nextInt();
            sides[1] = sc.nextInt();
            sides[2] = sc.nextInt();
            Arrays.sort(sides);
            sb.append((sides[2] * sides[2] == sides[1] * sides[1] + sides[0] * sides[0]) ? "YES" : "NO");
            sb.append('\n');
        }
        System.out.print(sb);
    }
} Main public static void main (String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        StringBuilder sb = new StringBuilder("");
        int[] sides = new int[3];
        for (int i = 0; i < n; i++) {
            sides[0] = sc.nextInt();
            sides[1] = sc.nextInt();
            sides[2] = sc.nextInt();
            Arrays.sort(sides);
            sb.append((sides[2] * sides[2] == sides[1] * sides[1] + sides[0] * sides[0]) ? "YES" : "NO");
            sb.append('\n');
        }
        System.out.print(sb);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        StringBuilder sb = new StringBuilder("");
        int[] sides = new int[3];
        for (int i = 0; i < n; i++) {
            sides[0] = sc.nextInt();
            sides[1] = sc.nextInt();
            sides[2] = sc.nextInt();
            Arrays.sort(sides);
            sb.append((sides[2] * sides[2] == sides[1] * sides[1] + sides[0] * sides[0]) ? "YES" : "NO");
            sb.append('\n');
        }
        System.out.print(sb);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc StringBuilder sb = new StringBuilder(""); sb new StringBuilder("") int[] sides = new int[3]; sides new int[3] 3 for (int i = 0; i < n; i++) {
            sides[0] = sc.nextInt();
            sides[1] = sc.nextInt();
            sides[2] = sc.nextInt();
            Arrays.sort(sides);
            sb.append((sides[2] * sides[2] == sides[1] * sides[1] + sides[0] * sides[0]) ? "YES" : "NO");
            sb.append('\n');
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            sides[0] = sc.nextInt();
            sides[1] = sc.nextInt();
            sides[2] = sc.nextInt();
            Arrays.sort(sides);
            sb.append((sides[2] * sides[2] == sides[1] * sides[1] + sides[0] * sides[0]) ? "YES" : "NO");
            sb.append('\n');
        } {
            sides[0] = sc.nextInt();
            sides[1] = sc.nextInt();
            sides[2] = sc.nextInt();
            Arrays.sort(sides);
            sb.append((sides[2] * sides[2] == sides[1] * sides[1] + sides[0] * sides[0]) ? "YES" : "NO");
            sb.append('\n');
        } sides[0] = sc.nextInt() sides[0] sides 0 sc.nextInt() sc.nextInt sc sides[1] = sc.nextInt() sides[1] sides 1 sc.nextInt() sc.nextInt sc sides[2] = sc.nextInt() sides[2] sides 2 sc.nextInt() sc.nextInt sc Arrays.sort(sides) Arrays.sort Arrays sides sb.append((sides[2] * sides[2] == sides[1] * sides[1] + sides[0] * sides[0]) ? "YES" : "NO") sb.append sb (sides[2] * sides[2] == sides[1] * sides[1] + sides[0] * sides[0]) ? "YES" : "NO" (sides[2] * sides[2] == sides[1] * sides[1] + sides[0] * sides[0]) sides[2] * sides[2] sides[2] sides 2 sides[2] sides 2 sides[1] * sides[1] + sides[0] * sides[0] sides[1] * sides[1] sides[1] sides 1 sides[1] sides 1 sides[0] * sides[0] sides[0] sides 0 sides[0] sides 0 "YES" "NO" sb.append('\n') sb.append sb '\n' System.out.print(sb) System.out.print System.out System System.out sb String[] args args
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.Arrays;
import java.util.Collections;

class Main {
    public static void main (String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        StringBuilder sb = new StringBuilder("");
        int[] sides = new int[3];
        for (int i = 0; i < n; i++) {
            sides[0] = sc.nextInt();
            sides[1] = sc.nextInt();
            sides[2] = sc.nextInt();
            Arrays.sort(sides);
            sb.append((sides[2] * sides[2] == sides[1] * sides[1] + sides[0] * sides[0]) ? "YES" : "NO");
            sb.append('\n');
        }
        System.out.print(sb);
    }
}