import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;

public class Main {
    public static void main(String[] args) throws Exception {
        // Here your code !
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        //int n = Integer.parseInt("1");
        for(int i = 0;i < n;i++){
            String[] vals = br.readLine().split(" ",0);
            //String[] vals = "4 3 5".split(" ",0);
            int[] int_vals = new int[vals.length];
            for(int j = 0;j < int_vals.length;j++){
                int_vals[j] = Integer.parseInt(vals[j]);
            }
            Arrays.sort(int_vals);
            
            int a2 = int_vals[2] * int_vals[2];
            int b2 = int_vals[1] * int_vals[1];
            int c2 = int_vals[0] * int_vals[0];

            if(a2 == b2 + c2){
                 System.out.println("YES");
            }else{
                 System.out.println("NO");
            }
        }
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Arrays; Arrays java.util public class Main {
    public static void main(String[] args) throws Exception {
        // Here your code !
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        //int n = Integer.parseInt("1");
        for(int i = 0;i < n;i++){
            String[] vals = br.readLine().split(" ",0);
            //String[] vals = "4 3 5".split(" ",0);
            int[] int_vals = new int[vals.length];
            for(int j = 0;j < int_vals.length;j++){
                int_vals[j] = Integer.parseInt(vals[j]);
            }
            Arrays.sort(int_vals);
            
            int a2 = int_vals[2] * int_vals[2];
            int b2 = int_vals[1] * int_vals[1];
            int c2 = int_vals[0] * int_vals[0];

            if(a2 == b2 + c2){
                 System.out.println("YES");
            }else{
                 System.out.println("NO");
            }
        }
    }
} Main public static void main(String[] args) throws Exception {
        // Here your code !
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        //int n = Integer.parseInt("1");
        for(int i = 0;i < n;i++){
            String[] vals = br.readLine().split(" ",0);
            //String[] vals = "4 3 5".split(" ",0);
            int[] int_vals = new int[vals.length];
            for(int j = 0;j < int_vals.length;j++){
                int_vals[j] = Integer.parseInt(vals[j]);
            }
            Arrays.sort(int_vals);
            
            int a2 = int_vals[2] * int_vals[2];
            int b2 = int_vals[1] * int_vals[1];
            int c2 = int_vals[0] * int_vals[0];

            if(a2 == b2 + c2){
                 System.out.println("YES");
            }else{
                 System.out.println("NO");
            }
        }
    } main {
        // Here your code !
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        //int n = Integer.parseInt("1");
        for(int i = 0;i < n;i++){
            String[] vals = br.readLine().split(" ",0);
            //String[] vals = "4 3 5".split(" ",0);
            int[] int_vals = new int[vals.length];
            for(int j = 0;j < int_vals.length;j++){
                int_vals[j] = Integer.parseInt(vals[j]);
            }
            Arrays.sort(int_vals);
            
            int a2 = int_vals[2] * int_vals[2];
            int b2 = int_vals[1] * int_vals[1];
            int c2 = int_vals[0] * int_vals[0];

            if(a2 == b2 + c2){
                 System.out.println("YES");
            }else{
                 System.out.println("NO");
            }
        }
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int n = Integer.parseInt(br.readLine()); n Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br for(int i = 0;i < n;i++){
            String[] vals = br.readLine().split(" ",0);
            //String[] vals = "4 3 5".split(" ",0);
            int[] int_vals = new int[vals.length];
            for(int j = 0;j < int_vals.length;j++){
                int_vals[j] = Integer.parseInt(vals[j]);
            }
            Arrays.sort(int_vals);
            
            int a2 = int_vals[2] * int_vals[2];
            int b2 = int_vals[1] * int_vals[1];
            int c2 = int_vals[0] * int_vals[0];

            if(a2 == b2 + c2){
                 System.out.println("YES");
            }else{
                 System.out.println("NO");
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            String[] vals = br.readLine().split(" ",0);
            //String[] vals = "4 3 5".split(" ",0);
            int[] int_vals = new int[vals.length];
            for(int j = 0;j < int_vals.length;j++){
                int_vals[j] = Integer.parseInt(vals[j]);
            }
            Arrays.sort(int_vals);
            
            int a2 = int_vals[2] * int_vals[2];
            int b2 = int_vals[1] * int_vals[1];
            int c2 = int_vals[0] * int_vals[0];

            if(a2 == b2 + c2){
                 System.out.println("YES");
            }else{
                 System.out.println("NO");
            }
        } {
            String[] vals = br.readLine().split(" ",0);
            //String[] vals = "4 3 5".split(" ",0);
            int[] int_vals = new int[vals.length];
            for(int j = 0;j < int_vals.length;j++){
                int_vals[j] = Integer.parseInt(vals[j]);
            }
            Arrays.sort(int_vals);
            
            int a2 = int_vals[2] * int_vals[2];
            int b2 = int_vals[1] * int_vals[1];
            int c2 = int_vals[0] * int_vals[0];

            if(a2 == b2 + c2){
                 System.out.println("YES");
            }else{
                 System.out.println("NO");
            }
        } String[] vals = br.readLine().split(" ",0); vals br.readLine().split(" ",0) br.readLine().split br.readLine() br.readLine br " " 0 int[] int_vals = new int[vals.length]; int_vals new int[vals.length] vals.length vals vals.length for(int j = 0;j < int_vals.length;j++){
                int_vals[j] = Integer.parseInt(vals[j]);
            } int j = 0; int j = 0; j 0 j < int_vals.length j int_vals.length int_vals int_vals.length j++ j++ j {
                int_vals[j] = Integer.parseInt(vals[j]);
            } {
                int_vals[j] = Integer.parseInt(vals[j]);
            } int_vals[j] = Integer.parseInt(vals[j]) int_vals[j] int_vals j Integer.parseInt(vals[j]) Integer.parseInt Integer vals[j] vals j Arrays.sort(int_vals) Arrays.sort Arrays int_vals int a2 = int_vals[2] * int_vals[2]; a2 int_vals[2] * int_vals[2] int_vals[2] int_vals 2 int_vals[2] int_vals 2 int b2 = int_vals[1] * int_vals[1]; b2 int_vals[1] * int_vals[1] int_vals[1] int_vals 1 int_vals[1] int_vals 1 int c2 = int_vals[0] * int_vals[0]; c2 int_vals[0] * int_vals[0] int_vals[0] int_vals 0 int_vals[0] int_vals 0 if(a2 == b2 + c2){
                 System.out.println("YES");
            }else{
                 System.out.println("NO");
            } a2 == b2 + c2 a2 b2 + c2 b2 c2 {
                 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 Exception {
        // Here your code !
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        //int n = Integer.parseInt("1");
        for(int i = 0;i < n;i++){
            String[] vals = br.readLine().split(" ",0);
            //String[] vals = "4 3 5".split(" ",0);
            int[] int_vals = new int[vals.length];
            for(int j = 0;j < int_vals.length;j++){
                int_vals[j] = Integer.parseInt(vals[j]);
            }
            Arrays.sort(int_vals);
            
            int a2 = int_vals[2] * int_vals[2];
            int b2 = int_vals[1] * int_vals[1];
            int c2 = int_vals[0] * int_vals[0];

            if(a2 == b2 + c2){
                 System.out.println("YES");
            }else{
                 System.out.println("NO");
            }
        }
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        // Here your code !
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        //int n = Integer.parseInt("1");
        for(int i = 0;i < n;i++){
            String[] vals = br.readLine().split(" ",0);
            //String[] vals = "4 3 5".split(" ",0);
            int[] int_vals = new int[vals.length];
            for(int j = 0;j < int_vals.length;j++){
                int_vals[j] = Integer.parseInt(vals[j]);
            }
            Arrays.sort(int_vals);
            
            int a2 = int_vals[2] * int_vals[2];
            int b2 = int_vals[1] * int_vals[1];
            int c2 = int_vals[0] * int_vals[0];

            if(a2 == b2 + c2){
                 System.out.println("YES");
            }else{
                 System.out.println("NO");
            }
        }
    }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;

public class Main {
    public static void main(String[] args) throws Exception {
        // Here your code !
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        //int n = Integer.parseInt("1");
        for(int i = 0;i < n;i++){
            String[] vals = br.readLine().split(" ",0);
            //String[] vals = "4 3 5".split(" ",0);
            int[] int_vals = new int[vals.length];
            for(int j = 0;j < int_vals.length;j++){
                int_vals[j] = Integer.parseInt(vals[j]);
            }
            Arrays.sort(int_vals);
            
            int a2 = int_vals[2] * int_vals[2];
            int b2 = int_vals[1] * int_vals[1];
            int c2 = int_vals[0] * int_vals[0];

            if(a2 == b2 + c2){
                 System.out.println("YES");
            }else{
                 System.out.println("NO");
            }
        }
    }
}