import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int count = scanner.nextInt();

        for(int i=0; i<count; i++){
        	int a = scanner.nextInt();
            int b = scanner.nextInt();
            int c = scanner.nextInt();

            a*=a;
            b*=b;
            c*=c;

            if(a+b==c || b+c==a || c+a==b){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }

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

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int count = scanner.nextInt();

        for(int i=0; i<count; i++){
        	int a = scanner.nextInt();
            int b = scanner.nextInt();
            int c = scanner.nextInt();

            a*=a;
            b*=b;
            c*=c;

            if(a+b==c || b+c==a || c+a==b){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }

        }
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int count = scanner.nextInt();

        for(int i=0; i<count; i++){
        	int a = scanner.nextInt();
            int b = scanner.nextInt();
            int c = scanner.nextInt();

            a*=a;
            b*=b;
            c*=c;

            if(a+b==c || b+c==a || c+a==b){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }

        }
    } main {
        Scanner scanner = new Scanner(System.in);

        int count = scanner.nextInt();

        for(int i=0; i<count; i++){
        	int a = scanner.nextInt();
            int b = scanner.nextInt();
            int c = scanner.nextInt();

            a*=a;
            b*=b;
            c*=c;

            if(a+b==c || b+c==a || c+a==b){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }

        }
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int count = scanner.nextInt(); count scanner.nextInt() scanner.nextInt scanner for(int i=0; i<count; i++){
        	int a = scanner.nextInt();
            int b = scanner.nextInt();
            int c = scanner.nextInt();

            a*=a;
            b*=b;
            c*=c;

            if(a+b==c || b+c==a || c+a==b){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }

        } int i=0; int i=0; i 0 i<count i count i++ i++ i {
        	int a = scanner.nextInt();
            int b = scanner.nextInt();
            int c = scanner.nextInt();

            a*=a;
            b*=b;
            c*=c;

            if(a+b==c || b+c==a || c+a==b){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }

        } {
        	int a = scanner.nextInt();
            int b = scanner.nextInt();
            int c = scanner.nextInt();

            a*=a;
            b*=b;
            c*=c;

            if(a+b==c || b+c==a || c+a==b){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }

        } int a = scanner.nextInt(); a scanner.nextInt() scanner.nextInt scanner int b = scanner.nextInt(); b scanner.nextInt() scanner.nextInt scanner int c = scanner.nextInt(); c scanner.nextInt() scanner.nextInt scanner a*=a a a b*=b b b c*=c c c if(a+b==c || b+c==a || c+a==b){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            } a+b==c || b+c==a || c+a==b a+b==c || b+c==a || c+a==b a+b==c a+b a b c b+c==a b+c b c a c+a==b c+a c a b {
                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 scanner = new Scanner(System.in);

        int count = scanner.nextInt();

        for(int i=0; i<count; i++){
        	int a = scanner.nextInt();
            int b = scanner.nextInt();
            int c = scanner.nextInt();

            a*=a;
            b*=b;
            c*=c;

            if(a+b==c || b+c==a || c+a==b){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }

        }
    }
} public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int count = scanner.nextInt();

        for(int i=0; i<count; i++){
        	int a = scanner.nextInt();
            int b = scanner.nextInt();
            int c = scanner.nextInt();

            a*=a;
            b*=b;
            c*=c;

            if(a+b==c || b+c==a || c+a==b){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }

        }
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int count = scanner.nextInt();

        for(int i=0; i<count; i++){
        	int a = scanner.nextInt();
            int b = scanner.nextInt();
            int c = scanner.nextInt();

            a*=a;
            b*=b;
            c*=c;

            if(a+b==c || b+c==a || c+a==b){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }

        }
    }
}