import java.util.*;

class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int a, b, c;
		boolean flg;
		for(int i = 0; i < n; i++){
			a = sc.nextInt();
			b = sc.nextInt();
			c = sc.nextInt();
			if(a >= b && a >= c){
				flg = pita(a, b, c);
			}else if(b >= a && b >= c){
				flg = pita( b, a, c);
			}else{
				flg = pita( c, a, b);
			}
			if(flg){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		}
	}
	public static boolean pita(int a, int b, int c){
		if( a * a == b * b + c * c){
			return true;
		}
		return false;
	}
} import java.util.*; util.* java class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int a, b, c;
		boolean flg;
		for(int i = 0; i < n; i++){
			a = sc.nextInt();
			b = sc.nextInt();
			c = sc.nextInt();
			if(a >= b && a >= c){
				flg = pita(a, b, c);
			}else if(b >= a && b >= c){
				flg = pita( b, a, c);
			}else{
				flg = pita( c, a, b);
			}
			if(flg){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		}
	}
	public static boolean pita(int a, int b, int c){
		if( a * a == b * b + c * c){
			return true;
		}
		return false;
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int a, b, c;
		boolean flg;
		for(int i = 0; i < n; i++){
			a = sc.nextInt();
			b = sc.nextInt();
			c = sc.nextInt();
			if(a >= b && a >= c){
				flg = pita(a, b, c);
			}else if(b >= a && b >= c){
				flg = pita( b, a, c);
			}else{
				flg = pita( c, a, b);
			}
			if(flg){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int a, b, c;
		boolean flg;
		for(int i = 0; i < n; i++){
			a = sc.nextInt();
			b = sc.nextInt();
			c = sc.nextInt();
			if(a >= b && a >= c){
				flg = pita(a, b, c);
			}else if(b >= a && b >= c){
				flg = pita( b, a, c);
			}else{
				flg = pita( c, a, b);
			}
			if(flg){
				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 a a b b c; c boolean flg; flg for(int i = 0; i < n; i++){
			a = sc.nextInt();
			b = sc.nextInt();
			c = sc.nextInt();
			if(a >= b && a >= c){
				flg = pita(a, b, c);
			}else if(b >= a && b >= c){
				flg = pita( b, a, c);
			}else{
				flg = pita( c, a, b);
			}
			if(flg){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			a = sc.nextInt();
			b = sc.nextInt();
			c = sc.nextInt();
			if(a >= b && a >= c){
				flg = pita(a, b, c);
			}else if(b >= a && b >= c){
				flg = pita( b, a, c);
			}else{
				flg = pita( c, a, b);
			}
			if(flg){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		} {
			a = sc.nextInt();
			b = sc.nextInt();
			c = sc.nextInt();
			if(a >= b && a >= c){
				flg = pita(a, b, c);
			}else if(b >= a && b >= c){
				flg = pita( b, a, c);
			}else{
				flg = pita( c, a, b);
			}
			if(flg){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		} a = sc.nextInt() a sc.nextInt() sc.nextInt sc b = sc.nextInt() b sc.nextInt() sc.nextInt sc c = sc.nextInt() c sc.nextInt() sc.nextInt sc if(a >= b && a >= c){
				flg = pita(a, b, c);
			}else if(b >= a && b >= c){
				flg = pita( b, a, c);
			}else{
				flg = pita( c, a, b);
			} a >= b && a >= c a >= b a b a >= c a c {
				flg = pita(a, b, c);
			} flg = pita(a, b, c) flg pita(a, b, c) pita a b c if(b >= a && b >= c){
				flg = pita( b, a, c);
			}else{
				flg = pita( c, a, b);
			} b >= a && b >= c b >= a b a b >= c b c {
				flg = pita( b, a, c);
			} flg = pita( b, a, c) flg pita( b, a, c) pita b a c {
				flg = pita( c, a, b);
			} flg = pita( c, a, b) flg pita( c, a, b) pita c a b if(flg){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			} flg {
				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 static boolean pita(int a, int b, int c){
		if( a * a == b * b + c * c){
			return true;
		}
		return false;
	} pita {
		if( a * a == b * b + c * c){
			return true;
		}
		return false;
	} if( a * a == b * b + c * c){
			return true;
		} a * a == b * b + c * c a * a a a b * b + c * c b * b b b c * c c c {
			return true;
		} return true; true return false; false int a a int b b int c c
import java.util.*;

class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int a, b, c;
		boolean flg;
		for(int i = 0; i < n; i++){
			a = sc.nextInt();
			b = sc.nextInt();
			c = sc.nextInt();
			if(a >= b && a >= c){
				flg = pita(a, b, c);
			}else if(b >= a && b >= c){
				flg = pita( b, a, c);
			}else{
				flg = pita( c, a, b);
			}
			if(flg){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		}
	}
	public static boolean pita(int a, int b, int c){
		if( a * a == b * b + c * c){
			return true;
		}
		return false;
	}
}