import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner s=new Scanner(System.in);
		int a,b,c,n,i,temp,x,y;
		n=s.nextInt();
		for(i=0;i<n;i++){
			a=s.nextInt();
			b=s.nextInt();
			if(b>a){
				temp=a;
				a=b;
				b=temp;
			}
			c=s.nextInt();
			if(c>a){
				temp=a;
				a=c;
				c=temp;
			}
			x=a*a;y=b*b+c*c;
			if(x!=y)
				System.out.println("NO");
			else
				System.out.println("YES");
		}

	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner s=new Scanner(System.in);
		int a,b,c,n,i,temp,x,y;
		n=s.nextInt();
		for(i=0;i<n;i++){
			a=s.nextInt();
			b=s.nextInt();
			if(b>a){
				temp=a;
				a=b;
				b=temp;
			}
			c=s.nextInt();
			if(c>a){
				temp=a;
				a=c;
				c=temp;
			}
			x=a*a;y=b*b+c*c;
			if(x!=y)
				System.out.println("NO");
			else
				System.out.println("YES");
		}

	}

} Main public static void main(String[] args) {
		Scanner s=new Scanner(System.in);
		int a,b,c,n,i,temp,x,y;
		n=s.nextInt();
		for(i=0;i<n;i++){
			a=s.nextInt();
			b=s.nextInt();
			if(b>a){
				temp=a;
				a=b;
				b=temp;
			}
			c=s.nextInt();
			if(c>a){
				temp=a;
				a=c;
				c=temp;
			}
			x=a*a;y=b*b+c*c;
			if(x!=y)
				System.out.println("NO");
			else
				System.out.println("YES");
		}

	} main {
		Scanner s=new Scanner(System.in);
		int a,b,c,n,i,temp,x,y;
		n=s.nextInt();
		for(i=0;i<n;i++){
			a=s.nextInt();
			b=s.nextInt();
			if(b>a){
				temp=a;
				a=b;
				b=temp;
			}
			c=s.nextInt();
			if(c>a){
				temp=a;
				a=c;
				c=temp;
			}
			x=a*a;y=b*b+c*c;
			if(x!=y)
				System.out.println("NO");
			else
				System.out.println("YES");
		}

	} Scanner s=new Scanner(System.in); s new Scanner(System.in) int a a b b c c n n i i temp temp x x y; y n=s.nextInt() n s.nextInt() s.nextInt s for(i=0;i<n;i++){
			a=s.nextInt();
			b=s.nextInt();
			if(b>a){
				temp=a;
				a=b;
				b=temp;
			}
			c=s.nextInt();
			if(c>a){
				temp=a;
				a=c;
				c=temp;
			}
			x=a*a;y=b*b+c*c;
			if(x!=y)
				System.out.println("NO");
			else
				System.out.println("YES");
		} i=0; i=0 i 0 i<n i n i++ i++ i {
			a=s.nextInt();
			b=s.nextInt();
			if(b>a){
				temp=a;
				a=b;
				b=temp;
			}
			c=s.nextInt();
			if(c>a){
				temp=a;
				a=c;
				c=temp;
			}
			x=a*a;y=b*b+c*c;
			if(x!=y)
				System.out.println("NO");
			else
				System.out.println("YES");
		} {
			a=s.nextInt();
			b=s.nextInt();
			if(b>a){
				temp=a;
				a=b;
				b=temp;
			}
			c=s.nextInt();
			if(c>a){
				temp=a;
				a=c;
				c=temp;
			}
			x=a*a;y=b*b+c*c;
			if(x!=y)
				System.out.println("NO");
			else
				System.out.println("YES");
		} a=s.nextInt() a s.nextInt() s.nextInt s b=s.nextInt() b s.nextInt() s.nextInt s if(b>a){
				temp=a;
				a=b;
				b=temp;
			} b>a b a {
				temp=a;
				a=b;
				b=temp;
			} temp=a temp a a=b a b b=temp b temp c=s.nextInt() c s.nextInt() s.nextInt s if(c>a){
				temp=a;
				a=c;
				c=temp;
			} c>a c a {
				temp=a;
				a=c;
				c=temp;
			} temp=a temp a a=c a c c=temp c temp x=a*a x a*a a a y=b*b+c*c y b*b+c*c b*b b b c*c c c if(x!=y)
				System.out.println("NO");
			else
				System.out.println("YES"); x!=y x y System.out.println("NO") System.out.println System.out System System.out "NO" System.out.println("YES") System.out.println System.out System System.out "YES" String[] args args public class Main {

	public static void main(String[] args) {
		Scanner s=new Scanner(System.in);
		int a,b,c,n,i,temp,x,y;
		n=s.nextInt();
		for(i=0;i<n;i++){
			a=s.nextInt();
			b=s.nextInt();
			if(b>a){
				temp=a;
				a=b;
				b=temp;
			}
			c=s.nextInt();
			if(c>a){
				temp=a;
				a=c;
				c=temp;
			}
			x=a*a;y=b*b+c*c;
			if(x!=y)
				System.out.println("NO");
			else
				System.out.println("YES");
		}

	}

} public class Main {

	public static void main(String[] args) {
		Scanner s=new Scanner(System.in);
		int a,b,c,n,i,temp,x,y;
		n=s.nextInt();
		for(i=0;i<n;i++){
			a=s.nextInt();
			b=s.nextInt();
			if(b>a){
				temp=a;
				a=b;
				b=temp;
			}
			c=s.nextInt();
			if(c>a){
				temp=a;
				a=c;
				c=temp;
			}
			x=a*a;y=b*b+c*c;
			if(x!=y)
				System.out.println("NO");
			else
				System.out.println("YES");
		}

	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner s=new Scanner(System.in);
		int a,b,c,n,i,temp,x,y;
		n=s.nextInt();
		for(i=0;i<n;i++){
			a=s.nextInt();
			b=s.nextInt();
			if(b>a){
				temp=a;
				a=b;
				b=temp;
			}
			c=s.nextInt();
			if(c>a){
				temp=a;
				a=c;
				c=temp;
			}
			x=a*a;y=b*b+c*c;
			if(x!=y)
				System.out.println("NO");
			else
				System.out.println("YES");
		}

	}

}