import java.util.*;
public class Main {
	public static void main(String[] args){
	 
	Scanner sc= new Scanner (System.in);
	int n = sc.nextInt();
	int i[];
	i = new int[3];
for(int count=0;count<n;count++){	
		for(int d=0;d<3;d++ ){
			i[d]=sc.nextInt();
		}
		Arrays.sort(i);
		if((i[2]*i[2])==(i[0]*i[0])+(i[1]*i[1])){
			System.out.println("YES");
		}
		else System.out.println("NO");
		}
	 
	
	}

} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
	 
	Scanner sc= new Scanner (System.in);
	int n = sc.nextInt();
	int i[];
	i = new int[3];
for(int count=0;count<n;count++){	
		for(int d=0;d<3;d++ ){
			i[d]=sc.nextInt();
		}
		Arrays.sort(i);
		if((i[2]*i[2])==(i[0]*i[0])+(i[1]*i[1])){
			System.out.println("YES");
		}
		else System.out.println("NO");
		}
	 
	
	}

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

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

} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
	 
	Scanner sc= new Scanner (System.in);
	int n = sc.nextInt();
	int i[];
	i = new int[3];
for(int count=0;count<n;count++){	
		for(int d=0;d<3;d++ ){
			i[d]=sc.nextInt();
		}
		Arrays.sort(i);
		if((i[2]*i[2])==(i[0]*i[0])+(i[1]*i[1])){
			System.out.println("YES");
		}
		else System.out.println("NO");
		}
	 
	
	}

}