import java.util.*;

public class Main {
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		int N=sc.nextInt();
		for(int i=0;i<N;i++){
			int a=0,b=0,c=0;
			int x=sc.nextInt();
			int y=sc.nextInt();
			if(x>y){
				int t=x;
				x=y;
				y=t;
			}
			int z=sc.nextInt();
			if(z<x){
				a=z;
				b=x;
				c=y;
			}else if(z<y){
				a=x;
				b=z;
				c=y;
			}else{
				a=x;
				b=y;
				c=z;
			}
			if(a*a+b*b==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){
		Scanner sc=new Scanner(System.in);
		int N=sc.nextInt();
		for(int i=0;i<N;i++){
			int a=0,b=0,c=0;
			int x=sc.nextInt();
			int y=sc.nextInt();
			if(x>y){
				int t=x;
				x=y;
				y=t;
			}
			int z=sc.nextInt();
			if(z<x){
				a=z;
				b=x;
				c=y;
			}else if(z<y){
				a=x;
				b=z;
				c=y;
			}else{
				a=x;
				b=y;
				c=z;
			}
			if(a*a+b*b==c*c){
				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();
		for(int i=0;i<N;i++){
			int a=0,b=0,c=0;
			int x=sc.nextInt();
			int y=sc.nextInt();
			if(x>y){
				int t=x;
				x=y;
				y=t;
			}
			int z=sc.nextInt();
			if(z<x){
				a=z;
				b=x;
				c=y;
			}else if(z<y){
				a=x;
				b=z;
				c=y;
			}else{
				a=x;
				b=y;
				c=z;
			}
			if(a*a+b*b==c*c){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		}
	} main {
		Scanner sc=new Scanner(System.in);
		int N=sc.nextInt();
		for(int i=0;i<N;i++){
			int a=0,b=0,c=0;
			int x=sc.nextInt();
			int y=sc.nextInt();
			if(x>y){
				int t=x;
				x=y;
				y=t;
			}
			int z=sc.nextInt();
			if(z<x){
				a=z;
				b=x;
				c=y;
			}else if(z<y){
				a=x;
				b=z;
				c=y;
			}else{
				a=x;
				b=y;
				c=z;
			}
			if(a*a+b*b==c*c){
				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 for(int i=0;i<N;i++){
			int a=0,b=0,c=0;
			int x=sc.nextInt();
			int y=sc.nextInt();
			if(x>y){
				int t=x;
				x=y;
				y=t;
			}
			int z=sc.nextInt();
			if(z<x){
				a=z;
				b=x;
				c=y;
			}else if(z<y){
				a=x;
				b=z;
				c=y;
			}else{
				a=x;
				b=y;
				c=z;
			}
			if(a*a+b*b==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 {
			int a=0,b=0,c=0;
			int x=sc.nextInt();
			int y=sc.nextInt();
			if(x>y){
				int t=x;
				x=y;
				y=t;
			}
			int z=sc.nextInt();
			if(z<x){
				a=z;
				b=x;
				c=y;
			}else if(z<y){
				a=x;
				b=z;
				c=y;
			}else{
				a=x;
				b=y;
				c=z;
			}
			if(a*a+b*b==c*c){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		} {
			int a=0,b=0,c=0;
			int x=sc.nextInt();
			int y=sc.nextInt();
			if(x>y){
				int t=x;
				x=y;
				y=t;
			}
			int z=sc.nextInt();
			if(z<x){
				a=z;
				b=x;
				c=y;
			}else if(z<y){
				a=x;
				b=z;
				c=y;
			}else{
				a=x;
				b=y;
				c=z;
			}
			if(a*a+b*b==c*c){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		} int a=0 a 0 b=0 b 0 c=0; c 0 int x=sc.nextInt(); x sc.nextInt() sc.nextInt sc int y=sc.nextInt(); y sc.nextInt() sc.nextInt sc if(x>y){
				int t=x;
				x=y;
				y=t;
			} x>y x y {
				int t=x;
				x=y;
				y=t;
			} int t=x; t x x=y x y y=t y t int z=sc.nextInt(); z sc.nextInt() sc.nextInt sc if(z<x){
				a=z;
				b=x;
				c=y;
			}else if(z<y){
				a=x;
				b=z;
				c=y;
			}else{
				a=x;
				b=y;
				c=z;
			} z<x z x {
				a=z;
				b=x;
				c=y;
			} a=z a z b=x b x c=y c y if(z<y){
				a=x;
				b=z;
				c=y;
			}else{
				a=x;
				b=y;
				c=z;
			} z<y z y {
				a=x;
				b=z;
				c=y;
			} a=x a x b=z b z c=y c y {
				a=x;
				b=y;
				c=z;
			} a=x a x b=y b y c=z c z if(a*a+b*b==c*c){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			} a*a+b*b==c*c a*a+b*b a*a a a b*b b b 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){
		Scanner sc=new Scanner(System.in);
		int N=sc.nextInt();
		for(int i=0;i<N;i++){
			int a=0,b=0,c=0;
			int x=sc.nextInt();
			int y=sc.nextInt();
			if(x>y){
				int t=x;
				x=y;
				y=t;
			}
			int z=sc.nextInt();
			if(z<x){
				a=z;
				b=x;
				c=y;
			}else if(z<y){
				a=x;
				b=z;
				c=y;
			}else{
				a=x;
				b=y;
				c=z;
			}
			if(a*a+b*b==c*c){
				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();
		for(int i=0;i<N;i++){
			int a=0,b=0,c=0;
			int x=sc.nextInt();
			int y=sc.nextInt();
			if(x>y){
				int t=x;
				x=y;
				y=t;
			}
			int z=sc.nextInt();
			if(z<x){
				a=z;
				b=x;
				c=y;
			}else if(z<y){
				a=x;
				b=z;
				c=y;
			}else{
				a=x;
				b=y;
				c=z;
			}
			if(a*a+b*b==c*c){
				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();
		for(int i=0;i<N;i++){
			int a=0,b=0,c=0;
			int x=sc.nextInt();
			int y=sc.nextInt();
			if(x>y){
				int t=x;
				x=y;
				y=t;
			}
			int z=sc.nextInt();
			if(z<x){
				a=z;
				b=x;
				c=y;
			}else if(z<y){
				a=x;
				b=z;
				c=y;
			}else{
				a=x;
				b=y;
				c=z;
			}
			if(a*a+b*b==c*c){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		}
	}
}