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