import java.util.Scanner;

class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        boolean[] judge = new boolean[n];
        if(n > 1000) n = 1000;
        for(int i = 0;i < n;i++){
            int a = sc.nextInt(),b = sc.nextInt(),c = sc.nextInt();
            judge[i] = (a * a + b * b == c * c) || (a * a + c * c == b * b) || (b * b + c * c == a * a);
        }
        for(int i = 0;i < n;i++){
            System.out.println(judge[i] ? "YES" : "NO");
        }
    }
} import java.util.Scanner; Scanner java.util class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        boolean[] judge = new boolean[n];
        if(n > 1000) n = 1000;
        for(int i = 0;i < n;i++){
            int a = sc.nextInt(),b = sc.nextInt(),c = sc.nextInt();
            judge[i] = (a * a + b * b == c * c) || (a * a + c * c == b * b) || (b * b + c * c == a * a);
        }
        for(int i = 0;i < n;i++){
            System.out.println(judge[i] ? "YES" : "NO");
        }
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        boolean[] judge = new boolean[n];
        if(n > 1000) n = 1000;
        for(int i = 0;i < n;i++){
            int a = sc.nextInt(),b = sc.nextInt(),c = sc.nextInt();
            judge[i] = (a * a + b * b == c * c) || (a * a + c * c == b * b) || (b * b + c * c == a * a);
        }
        for(int i = 0;i < n;i++){
            System.out.println(judge[i] ? "YES" : "NO");
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        boolean[] judge = new boolean[n];
        if(n > 1000) n = 1000;
        for(int i = 0;i < n;i++){
            int a = sc.nextInt(),b = sc.nextInt(),c = sc.nextInt();
            judge[i] = (a * a + b * b == c * c) || (a * a + c * c == b * b) || (b * b + c * c == a * a);
        }
        for(int i = 0;i < n;i++){
            System.out.println(judge[i] ? "YES" : "NO");
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc boolean[] judge = new boolean[n]; judge new boolean[n] n if(n > 1000) n = 1000; n > 1000 n 1000 n = 1000 n 1000 for(int i = 0;i < n;i++){
            int a = sc.nextInt(),b = sc.nextInt(),c = sc.nextInt();
            judge[i] = (a * a + b * b == c * c) || (a * a + c * c == b * b) || (b * b + c * c == a * a);
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            int a = sc.nextInt(),b = sc.nextInt(),c = sc.nextInt();
            judge[i] = (a * a + b * b == c * c) || (a * a + c * c == b * b) || (b * b + c * c == a * a);
        } {
            int a = sc.nextInt(),b = sc.nextInt(),c = sc.nextInt();
            judge[i] = (a * a + b * b == c * c) || (a * a + c * c == b * b) || (b * b + c * c == a * a);
        } int a = sc.nextInt() a sc.nextInt() sc.nextInt sc b = sc.nextInt() b sc.nextInt() sc.nextInt sc c = sc.nextInt(); c sc.nextInt() sc.nextInt sc judge[i] = (a * a + b * b == c * c) || (a * a + c * c == b * b) || (b * b + c * c == a * a) judge[i] judge i (a * a + b * b == c * c) || (a * a + c * c == b * b) || (b * b + c * c == a * a) (a * a + b * b == c * c) || (a * a + c * c == b * b) || (b * b + c * c == a * a) (a * a + b * b == c * c) a * a + b * b a * a a a b * b b b c * c c c (a * a + c * c == b * b) a * a + c * c a * a a a c * c c c b * b b b (b * b + c * c == a * a) b * b + c * c b * b b b c * c c c a * a a a for(int i = 0;i < n;i++){
            System.out.println(judge[i] ? "YES" : "NO");
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            System.out.println(judge[i] ? "YES" : "NO");
        } {
            System.out.println(judge[i] ? "YES" : "NO");
        } System.out.println(judge[i] ? "YES" : "NO") System.out.println System.out System System.out judge[i] ? "YES" : "NO" judge[i] judge i "YES" "NO" String[] args args
import java.util.Scanner;

class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        boolean[] judge = new boolean[n];
        if(n > 1000) n = 1000;
        for(int i = 0;i < n;i++){
            int a = sc.nextInt(),b = sc.nextInt(),c = sc.nextInt();
            judge[i] = (a * a + b * b == c * c) || (a * a + c * c == b * b) || (b * b + c * c == a * a);
        }
        for(int i = 0;i < n;i++){
            System.out.println(judge[i] ? "YES" : "NO");
        }
    }
}