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

public class Main {

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

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

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

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

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

} public class Main {

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

} Main
import java.util.Arrays;
import java.util.Scanner;

public class Main {

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

}