import java.util.Scanner;

class Main{
    public static void main(String[] x){
		Scanner sc = new Scanner(System.in);
		short N = (short)Integer.parseInt(sc.nextLine());
		short[] a = new short[N];
		short[] b = new short[N];
		short[] c = new short[N];
		for(short i=0;i<N;i++){
			String s = sc.nextLine();
			a[i] = (short)Integer.parseInt((s.split(" ",0))[0]);
			b[i] = (short)Integer.parseInt((s.split(" ",0))[1]);
			c[i] = (short)Integer.parseInt((s.split(" ",0))[2]);
		}
		for(short i=0;i<N;i++){
			if(isRightTriangle(a[i],b[i],c[i])){System.out.println("YES");}
			else{System.out.println("NO");}
		}
    }
	public static boolean isRightTriangle(int a, int b, int c){
		return (a>=b&&a>=c&&a*a==b*b+c*c)
			||(b>=c&&b>=a&&b*b==c*c+a*a)
			||(c>=a&&c>=b&&c*c==a*a+b*b);
	}
} import java.util.Scanner; Scanner java.util class Main{
    public static void main(String[] x){
		Scanner sc = new Scanner(System.in);
		short N = (short)Integer.parseInt(sc.nextLine());
		short[] a = new short[N];
		short[] b = new short[N];
		short[] c = new short[N];
		for(short i=0;i<N;i++){
			String s = sc.nextLine();
			a[i] = (short)Integer.parseInt((s.split(" ",0))[0]);
			b[i] = (short)Integer.parseInt((s.split(" ",0))[1]);
			c[i] = (short)Integer.parseInt((s.split(" ",0))[2]);
		}
		for(short i=0;i<N;i++){
			if(isRightTriangle(a[i],b[i],c[i])){System.out.println("YES");}
			else{System.out.println("NO");}
		}
    }
	public static boolean isRightTriangle(int a, int b, int c){
		return (a>=b&&a>=c&&a*a==b*b+c*c)
			||(b>=c&&b>=a&&b*b==c*c+a*a)
			||(c>=a&&c>=b&&c*c==a*a+b*b);
	}
} Main public static void main(String[] x){
		Scanner sc = new Scanner(System.in);
		short N = (short)Integer.parseInt(sc.nextLine());
		short[] a = new short[N];
		short[] b = new short[N];
		short[] c = new short[N];
		for(short i=0;i<N;i++){
			String s = sc.nextLine();
			a[i] = (short)Integer.parseInt((s.split(" ",0))[0]);
			b[i] = (short)Integer.parseInt((s.split(" ",0))[1]);
			c[i] = (short)Integer.parseInt((s.split(" ",0))[2]);
		}
		for(short i=0;i<N;i++){
			if(isRightTriangle(a[i],b[i],c[i])){System.out.println("YES");}
			else{System.out.println("NO");}
		}
    } main {
		Scanner sc = new Scanner(System.in);
		short N = (short)Integer.parseInt(sc.nextLine());
		short[] a = new short[N];
		short[] b = new short[N];
		short[] c = new short[N];
		for(short i=0;i<N;i++){
			String s = sc.nextLine();
			a[i] = (short)Integer.parseInt((s.split(" ",0))[0]);
			b[i] = (short)Integer.parseInt((s.split(" ",0))[1]);
			c[i] = (short)Integer.parseInt((s.split(" ",0))[2]);
		}
		for(short i=0;i<N;i++){
			if(isRightTriangle(a[i],b[i],c[i])){System.out.println("YES");}
			else{System.out.println("NO");}
		}
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) short N = (short)Integer.parseInt(sc.nextLine()); N (short)Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc short[] a = new short[N]; a new short[N] N short[] b = new short[N]; b new short[N] N short[] c = new short[N]; c new short[N] N for(short i=0;i<N;i++){
			String s = sc.nextLine();
			a[i] = (short)Integer.parseInt((s.split(" ",0))[0]);
			b[i] = (short)Integer.parseInt((s.split(" ",0))[1]);
			c[i] = (short)Integer.parseInt((s.split(" ",0))[2]);
		} short i=0; short i=0; i 0 i<N i N i++ i++ i {
			String s = sc.nextLine();
			a[i] = (short)Integer.parseInt((s.split(" ",0))[0]);
			b[i] = (short)Integer.parseInt((s.split(" ",0))[1]);
			c[i] = (short)Integer.parseInt((s.split(" ",0))[2]);
		} {
			String s = sc.nextLine();
			a[i] = (short)Integer.parseInt((s.split(" ",0))[0]);
			b[i] = (short)Integer.parseInt((s.split(" ",0))[1]);
			c[i] = (short)Integer.parseInt((s.split(" ",0))[2]);
		} String s = sc.nextLine(); s sc.nextLine() sc.nextLine sc a[i] = (short)Integer.parseInt((s.split(" ",0))[0]) a[i] a i (short)Integer.parseInt((s.split(" ",0))[0]) Integer.parseInt Integer (s.split(" ",0))[0] (s.split(" ",0)) s.split s " " 0 0 b[i] = (short)Integer.parseInt((s.split(" ",0))[1]) b[i] b i (short)Integer.parseInt((s.split(" ",0))[1]) Integer.parseInt Integer (s.split(" ",0))[1] (s.split(" ",0)) s.split s " " 0 1 c[i] = (short)Integer.parseInt((s.split(" ",0))[2]) c[i] c i (short)Integer.parseInt((s.split(" ",0))[2]) Integer.parseInt Integer (s.split(" ",0))[2] (s.split(" ",0)) s.split s " " 0 2 for(short i=0;i<N;i++){
			if(isRightTriangle(a[i],b[i],c[i])){System.out.println("YES");}
			else{System.out.println("NO");}
		} short i=0; short i=0; i 0 i<N i N i++ i++ i {
			if(isRightTriangle(a[i],b[i],c[i])){System.out.println("YES");}
			else{System.out.println("NO");}
		} {
			if(isRightTriangle(a[i],b[i],c[i])){System.out.println("YES");}
			else{System.out.println("NO");}
		} if(isRightTriangle(a[i],b[i],c[i])){System.out.println("YES");}
			else{System.out.println("NO");} isRightTriangle(a[i],b[i],c[i]) isRightTriangle a[i] a i b[i] b i c[i] c i {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[] x x public static boolean isRightTriangle(int a, int b, int c){
		return (a>=b&&a>=c&&a*a==b*b+c*c)
			||(b>=c&&b>=a&&b*b==c*c+a*a)
			||(c>=a&&c>=b&&c*c==a*a+b*b);
	} isRightTriangle {
		return (a>=b&&a>=c&&a*a==b*b+c*c)
			||(b>=c&&b>=a&&b*b==c*c+a*a)
			||(c>=a&&c>=b&&c*c==a*a+b*b);
	} return (a>=b&&a>=c&&a*a==b*b+c*c)
			||(b>=c&&b>=a&&b*b==c*c+a*a)
			||(c>=a&&c>=b&&c*c==a*a+b*b); (a>=b&&a>=c&&a*a==b*b+c*c)
			||(b>=c&&b>=a&&b*b==c*c+a*a)
			||(c>=a&&c>=b&&c*c==a*a+b*b) (a>=b&&a>=c&&a*a==b*b+c*c)
			||(b>=c&&b>=a&&b*b==c*c+a*a)
			||(c>=a&&c>=b&&c*c==a*a+b*b) (a>=b&&a>=c&&a*a==b*b+c*c) a>=b&&a>=c&&a*a==b*b+c*c a>=b a b a>=c a c a*a==b*b+c*c a*a a a b*b+c*c b*b b b c*c c c (b>=c&&b>=a&&b*b==c*c+a*a) b>=c&&b>=a&&b*b==c*c+a*a b>=c b c b>=a b a b*b==c*c+a*a b*b b b c*c+a*a c*c c c a*a a a (c>=a&&c>=b&&c*c==a*a+b*b) c>=a&&c>=b&&c*c==a*a+b*b c>=a c a c>=b c b c*c==a*a+b*b c*c c c a*a+b*b a*a a a b*b b b int a a int b b int c c
import java.util.Scanner;

class Main{
    public static void main(String[] x){
		Scanner sc = new Scanner(System.in);
		short N = (short)Integer.parseInt(sc.nextLine());
		short[] a = new short[N];
		short[] b = new short[N];
		short[] c = new short[N];
		for(short i=0;i<N;i++){
			String s = sc.nextLine();
			a[i] = (short)Integer.parseInt((s.split(" ",0))[0]);
			b[i] = (short)Integer.parseInt((s.split(" ",0))[1]);
			c[i] = (short)Integer.parseInt((s.split(" ",0))[2]);
		}
		for(short i=0;i<N;i++){
			if(isRightTriangle(a[i],b[i],c[i])){System.out.println("YES");}
			else{System.out.println("NO");}
		}
    }
	public static boolean isRightTriangle(int a, int b, int c){
		return (a>=b&&a>=c&&a*a==b*b+c*c)
			||(b>=c&&b>=a&&b*b==c*c+a*a)
			||(c>=a&&c>=b&&c*c==a*a+b*b);
	}
}