import java.util.*;

public class Main {
    public static void main(String args[] ) throws Exception {

        Scanner sc = new Scanner(System.in);
        String M = sc.nextLine();
        int N = Integer.parseInt(M);
        

        for (int i=0; i<N; i++) {
        	String[] array = sc.nextLine().split(" ");
        	List<Integer> triangle = new ArrayList<Integer>();

            triangle.add(Integer.parseInt(array[0]));
            triangle.add(Integer.parseInt(array[1]));
            triangle.add(Integer.parseInt(array[2]));
            
            Collections.sort(triangle);
            
            int A = (int)triangle.get(0);
            int B = (int)triangle.get(1);
            int C = (int)triangle.get(2);
           
            if((B*B + A*A) == C*C){
            	System.out.println("YES");
            }else{
            	System.out.println("NO");
            }
        }
    }
} import java.util.*; util.* java public class Main {
    public static void main(String args[] ) throws Exception {

        Scanner sc = new Scanner(System.in);
        String M = sc.nextLine();
        int N = Integer.parseInt(M);
        

        for (int i=0; i<N; i++) {
        	String[] array = sc.nextLine().split(" ");
        	List<Integer> triangle = new ArrayList<Integer>();

            triangle.add(Integer.parseInt(array[0]));
            triangle.add(Integer.parseInt(array[1]));
            triangle.add(Integer.parseInt(array[2]));
            
            Collections.sort(triangle);
            
            int A = (int)triangle.get(0);
            int B = (int)triangle.get(1);
            int C = (int)triangle.get(2);
           
            if((B*B + A*A) == C*C){
            	System.out.println("YES");
            }else{
            	System.out.println("NO");
            }
        }
    }
} Main public static void main(String args[] ) throws Exception {

        Scanner sc = new Scanner(System.in);
        String M = sc.nextLine();
        int N = Integer.parseInt(M);
        

        for (int i=0; i<N; i++) {
        	String[] array = sc.nextLine().split(" ");
        	List<Integer> triangle = new ArrayList<Integer>();

            triangle.add(Integer.parseInt(array[0]));
            triangle.add(Integer.parseInt(array[1]));
            triangle.add(Integer.parseInt(array[2]));
            
            Collections.sort(triangle);
            
            int A = (int)triangle.get(0);
            int B = (int)triangle.get(1);
            int C = (int)triangle.get(2);
           
            if((B*B + A*A) == C*C){
            	System.out.println("YES");
            }else{
            	System.out.println("NO");
            }
        }
    } main {

        Scanner sc = new Scanner(System.in);
        String M = sc.nextLine();
        int N = Integer.parseInt(M);
        

        for (int i=0; i<N; i++) {
        	String[] array = sc.nextLine().split(" ");
        	List<Integer> triangle = new ArrayList<Integer>();

            triangle.add(Integer.parseInt(array[0]));
            triangle.add(Integer.parseInt(array[1]));
            triangle.add(Integer.parseInt(array[2]));
            
            Collections.sort(triangle);
            
            int A = (int)triangle.get(0);
            int B = (int)triangle.get(1);
            int C = (int)triangle.get(2);
           
            if((B*B + A*A) == C*C){
            	System.out.println("YES");
            }else{
            	System.out.println("NO");
            }
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String M = sc.nextLine(); M sc.nextLine() sc.nextLine sc int N = Integer.parseInt(M); N Integer.parseInt(M) Integer.parseInt Integer M for (int i=0; i<N; i++) {
        	String[] array = sc.nextLine().split(" ");
        	List<Integer> triangle = new ArrayList<Integer>();

            triangle.add(Integer.parseInt(array[0]));
            triangle.add(Integer.parseInt(array[1]));
            triangle.add(Integer.parseInt(array[2]));
            
            Collections.sort(triangle);
            
            int A = (int)triangle.get(0);
            int B = (int)triangle.get(1);
            int C = (int)triangle.get(2);
           
            if((B*B + A*A) == C*C){
            	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[] array = sc.nextLine().split(" ");
        	List<Integer> triangle = new ArrayList<Integer>();

            triangle.add(Integer.parseInt(array[0]));
            triangle.add(Integer.parseInt(array[1]));
            triangle.add(Integer.parseInt(array[2]));
            
            Collections.sort(triangle);
            
            int A = (int)triangle.get(0);
            int B = (int)triangle.get(1);
            int C = (int)triangle.get(2);
           
            if((B*B + A*A) == C*C){
            	System.out.println("YES");
            }else{
            	System.out.println("NO");
            }
        } {
        	String[] array = sc.nextLine().split(" ");
        	List<Integer> triangle = new ArrayList<Integer>();

            triangle.add(Integer.parseInt(array[0]));
            triangle.add(Integer.parseInt(array[1]));
            triangle.add(Integer.parseInt(array[2]));
            
            Collections.sort(triangle);
            
            int A = (int)triangle.get(0);
            int B = (int)triangle.get(1);
            int C = (int)triangle.get(2);
           
            if((B*B + A*A) == C*C){
            	System.out.println("YES");
            }else{
            	System.out.println("NO");
            }
        } String[] array = sc.nextLine().split(" "); array sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " List<Integer> triangle = new ArrayList<Integer>(); triangle new ArrayList<Integer>() triangle.add(Integer.parseInt(array[0])) triangle.add triangle Integer.parseInt(array[0]) Integer.parseInt Integer array[0] array 0 triangle.add(Integer.parseInt(array[1])) triangle.add triangle Integer.parseInt(array[1]) Integer.parseInt Integer array[1] array 1 triangle.add(Integer.parseInt(array[2])) triangle.add triangle Integer.parseInt(array[2]) Integer.parseInt Integer array[2] array 2 Collections.sort(triangle) Collections.sort Collections triangle int A = (int)triangle.get(0); A (int)triangle.get(0) triangle.get triangle 0 int B = (int)triangle.get(1); B (int)triangle.get(1) triangle.get triangle 1 int C = (int)triangle.get(2); C (int)triangle.get(2) triangle.get triangle 2 if((B*B + A*A) == C*C){
            	System.out.println("YES");
            }else{
            	System.out.println("NO");
            } (B*B + A*A) == C*C (B*B + A*A) B*B B B A*A A A C*C C C {
            	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 {

        Scanner sc = new Scanner(System.in);
        String M = sc.nextLine();
        int N = Integer.parseInt(M);
        

        for (int i=0; i<N; i++) {
        	String[] array = sc.nextLine().split(" ");
        	List<Integer> triangle = new ArrayList<Integer>();

            triangle.add(Integer.parseInt(array[0]));
            triangle.add(Integer.parseInt(array[1]));
            triangle.add(Integer.parseInt(array[2]));
            
            Collections.sort(triangle);
            
            int A = (int)triangle.get(0);
            int B = (int)triangle.get(1);
            int C = (int)triangle.get(2);
           
            if((B*B + A*A) == C*C){
            	System.out.println("YES");
            }else{
            	System.out.println("NO");
            }
        }
    }
} public class Main {
    public static void main(String args[] ) throws Exception {

        Scanner sc = new Scanner(System.in);
        String M = sc.nextLine();
        int N = Integer.parseInt(M);
        

        for (int i=0; i<N; i++) {
        	String[] array = sc.nextLine().split(" ");
        	List<Integer> triangle = new ArrayList<Integer>();

            triangle.add(Integer.parseInt(array[0]));
            triangle.add(Integer.parseInt(array[1]));
            triangle.add(Integer.parseInt(array[2]));
            
            Collections.sort(triangle);
            
            int A = (int)triangle.get(0);
            int B = (int)triangle.get(1);
            int C = (int)triangle.get(2);
           
            if((B*B + A*A) == C*C){
            	System.out.println("YES");
            }else{
            	System.out.println("NO");
            }
        }
    }
} Main
import java.util.*;

public class Main {
    public static void main(String args[] ) throws Exception {

        Scanner sc = new Scanner(System.in);
        String M = sc.nextLine();
        int N = Integer.parseInt(M);
        

        for (int i=0; i<N; i++) {
        	String[] array = sc.nextLine().split(" ");
        	List<Integer> triangle = new ArrayList<Integer>();

            triangle.add(Integer.parseInt(array[0]));
            triangle.add(Integer.parseInt(array[1]));
            triangle.add(Integer.parseInt(array[2]));
            
            Collections.sort(triangle);
            
            int A = (int)triangle.get(0);
            int B = (int)triangle.get(1);
            int C = (int)triangle.get(2);
           
            if((B*B + A*A) == C*C){
            	System.out.println("YES");
            }else{
            	System.out.println("NO");
            }
        }
    }
}