import java.io.IOException;
import java.util.Scanner;
import java.util.Arrays;

public class Main {
    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        for (int i = 0; i < n; i++){
            int a[] = new int[3];
            for (int j = 0; j < 3; j++){
                a[j] = sc.nextInt();
            }
            Arrays.sort(a);
            if (a[0]*a[0] + a[1]*a[1] == a[2]*a[2]){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }
        }
    }
} import java.io.IOException; IOException java.io import java.util.Scanner; Scanner java.util import java.util.Arrays; Arrays java.util public class Main {
    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        for (int i = 0; i < n; i++){
            int a[] = new int[3];
            for (int j = 0; j < 3; j++){
                a[j] = sc.nextInt();
            }
            Arrays.sort(a);
            if (a[0]*a[0] + a[1]*a[1] == a[2]*a[2]){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }
        }
    }
} Main public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        for (int i = 0; i < n; i++){
            int a[] = new int[3];
            for (int j = 0; j < 3; j++){
                a[j] = sc.nextInt();
            }
            Arrays.sort(a);
            if (a[0]*a[0] + a[1]*a[1] == a[2]*a[2]){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        for (int i = 0; i < n; i++){
            int a[] = new int[3];
            for (int j = 0; j < 3; j++){
                a[j] = sc.nextInt();
            }
            Arrays.sort(a);
            if (a[0]*a[0] + a[1]*a[1] == a[2]*a[2]){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc for (int i = 0; i < n; i++){
            int a[] = new int[3];
            for (int j = 0; j < 3; j++){
                a[j] = sc.nextInt();
            }
            Arrays.sort(a);
            if (a[0]*a[0] + a[1]*a[1] == a[2]*a[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 {
            int a[] = new int[3];
            for (int j = 0; j < 3; j++){
                a[j] = sc.nextInt();
            }
            Arrays.sort(a);
            if (a[0]*a[0] + a[1]*a[1] == a[2]*a[2]){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }
        } {
            int a[] = new int[3];
            for (int j = 0; j < 3; j++){
                a[j] = sc.nextInt();
            }
            Arrays.sort(a);
            if (a[0]*a[0] + a[1]*a[1] == a[2]*a[2]){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }
        } int a[] = new int[3]; a new int[3] 3 for (int j = 0; j < 3; j++){
                a[j] = sc.nextInt();
            } int j = 0; int j = 0; j 0 j < 3 j 3 j++ j++ j {
                a[j] = sc.nextInt();
            } {
                a[j] = sc.nextInt();
            } a[j] = sc.nextInt() a[j] a j sc.nextInt() sc.nextInt sc Arrays.sort(a) Arrays.sort Arrays a if (a[0]*a[0] + a[1]*a[1] == a[2]*a[2]){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            } a[0]*a[0] + a[1]*a[1] == a[2]*a[2] a[0]*a[0] + a[1]*a[1] a[0]*a[0] a[0] a 0 a[0] a 0 a[1]*a[1] a[1] a 1 a[1] a 1 a[2]*a[2] a[2] a 2 a[2] a 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[] args args public class Main {
    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        for (int i = 0; i < n; i++){
            int a[] = new int[3];
            for (int j = 0; j < 3; j++){
                a[j] = sc.nextInt();
            }
            Arrays.sort(a);
            if (a[0]*a[0] + a[1]*a[1] == a[2]*a[2]){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }
        }
    }
} public class Main {
    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        for (int i = 0; i < n; i++){
            int a[] = new int[3];
            for (int j = 0; j < 3; j++){
                a[j] = sc.nextInt();
            }
            Arrays.sort(a);
            if (a[0]*a[0] + a[1]*a[1] == a[2]*a[2]){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }
        }
    }
} Main
import java.io.IOException;
import java.util.Scanner;
import java.util.Arrays;

public class Main {
    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        for (int i = 0; i < n; i++){
            int a[] = new int[3];
            for (int j = 0; j < 3; j++){
                a[j] = sc.nextInt();
            }
            Arrays.sort(a);
            if (a[0]*a[0] + a[1]*a[1] == a[2]*a[2]){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }
        }
    }
}