import java.util.Arrays;
import java.util.Scanner;
public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int number = sc.nextInt();
        for (int i = 0; i < number; i++) {
            int []a = new int[3];
            a[0] = sc.nextInt();
            a[1] = sc.nextInt();
            a[2] = 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.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 number = sc.nextInt();
        for (int i = 0; i < number; i++) {
            int []a = new int[3];
            a[0] = sc.nextInt();
            a[1] = sc.nextInt();
            a[2] = 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) {
        Scanner sc = new Scanner(System.in);
        int number = sc.nextInt();
        for (int i = 0; i < number; i++) {
            int []a = new int[3];
            a[0] = sc.nextInt();
            a[1] = sc.nextInt();
            a[2] = 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 number = sc.nextInt();
        for (int i = 0; i < number; i++) {
            int []a = new int[3];
            a[0] = sc.nextInt();
            a[1] = sc.nextInt();
            a[2] = 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 number = sc.nextInt(); number sc.nextInt() sc.nextInt sc for (int i = 0; i < number; i++) {
            int []a = new int[3];
            a[0] = sc.nextInt();
            a[1] = sc.nextInt();
            a[2] = 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 < number i number i++ i++ i {
            int []a = new int[3];
            a[0] = sc.nextInt();
            a[1] = sc.nextInt();
            a[2] = 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[0] = sc.nextInt();
            a[1] = sc.nextInt();
            a[2] = 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 a[0] = sc.nextInt() a[0] a 0 sc.nextInt() sc.nextInt sc a[1] = sc.nextInt() a[1] a 1 sc.nextInt() sc.nextInt sc a[2] = sc.nextInt() a[2] a 2 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) {
        Scanner sc = new Scanner(System.in);
        int number = sc.nextInt();
        for (int i = 0; i < number; i++) {
            int []a = new int[3];
            a[0] = sc.nextInt();
            a[1] = sc.nextInt();
            a[2] = 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) {
        Scanner sc = new Scanner(System.in);
        int number = sc.nextInt();
        for (int i = 0; i < number; i++) {
            int []a = new int[3];
            a[0] = sc.nextInt();
            a[1] = sc.nextInt();
            a[2] = 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.util.Arrays;
import java.util.Scanner;
public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int number = sc.nextInt();
        for (int i = 0; i < number; i++) {
            int []a = new int[3];
            a[0] = sc.nextInt();
            a[1] = sc.nextInt();
            a[2] = 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");
            }
        }
    }
}