import java.util.Scanner;

public class Main {
	
	static boolean isRight(int a, int b, int c) {
		if (a * a + b * b == c * c || a * a + c * c == b * b
				|| b * b + c * c == a * a) {
			return true;
		} else
			return false;
	}

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int a,b,c;
		for(int i=0;i<n;i++){
			a=scan.nextInt();
			b=scan.nextInt();
			c=scan.nextInt();
			if(isRight(a,b,c)==true)	System.out.println("YES");
			else System.out.println("NO");
		}
	}

} import java.util.Scanner; Scanner java.util public class Main {
	
	static boolean isRight(int a, int b, int c) {
		if (a * a + b * b == c * c || a * a + c * c == b * b
				|| b * b + c * c == a * a) {
			return true;
		} else
			return false;
	}

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int a,b,c;
		for(int i=0;i<n;i++){
			a=scan.nextInt();
			b=scan.nextInt();
			c=scan.nextInt();
			if(isRight(a,b,c)==true)	System.out.println("YES");
			else System.out.println("NO");
		}
	}

} Main static boolean isRight(int a, int b, int c) {
		if (a * a + b * b == c * c || a * a + c * c == b * b
				|| b * b + c * c == a * a) {
			return true;
		} else
			return false;
	} isRight {
		if (a * a + b * b == c * c || a * a + c * c == b * b
				|| b * b + c * c == a * a) {
			return true;
		} else
			return false;
	} if (a * a + b * b == c * c || a * a + c * c == b * b
				|| b * b + c * c == a * a) {
			return true;
		} else
			return false; a * a + b * b == c * c || a * a + c * c == b * b
				|| b * b + c * c == a * a a * a + b * b == c * c || a * a + c * c == b * b
				|| b * b + c * c == a * a a * a + b * b == c * c a * a + b * b a * a a a b * b b b c * c c c a * a + c * c == b * b a * a + c * c a * a a a c * c c c b * b b b b * b + c * c == a * a b * b + c * c b * b b b c * c c c a * a a a {
			return true;
		} return true; true return false; false int a a int b b int c c public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int a,b,c;
		for(int i=0;i<n;i++){
			a=scan.nextInt();
			b=scan.nextInt();
			c=scan.nextInt();
			if(isRight(a,b,c)==true)	System.out.println("YES");
			else System.out.println("NO");
		}
	} main {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int a,b,c;
		for(int i=0;i<n;i++){
			a=scan.nextInt();
			b=scan.nextInt();
			c=scan.nextInt();
			if(isRight(a,b,c)==true)	System.out.println("YES");
			else System.out.println("NO");
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int a a b b c; c for(int i=0;i<n;i++){
			a=scan.nextInt();
			b=scan.nextInt();
			c=scan.nextInt();
			if(isRight(a,b,c)==true)	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=scan.nextInt();
			b=scan.nextInt();
			c=scan.nextInt();
			if(isRight(a,b,c)==true)	System.out.println("YES");
			else System.out.println("NO");
		} {
			a=scan.nextInt();
			b=scan.nextInt();
			c=scan.nextInt();
			if(isRight(a,b,c)==true)	System.out.println("YES");
			else System.out.println("NO");
		} a=scan.nextInt() a scan.nextInt() scan.nextInt scan b=scan.nextInt() b scan.nextInt() scan.nextInt scan c=scan.nextInt() c scan.nextInt() scan.nextInt scan if(isRight(a,b,c)==true)	System.out.println("YES");
			else System.out.println("NO"); isRight(a,b,c)==true isRight(a,b,c) isRight a b c true 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" String[] args args public class Main {
	
	static boolean isRight(int a, int b, int c) {
		if (a * a + b * b == c * c || a * a + c * c == b * b
				|| b * b + c * c == a * a) {
			return true;
		} else
			return false;
	}

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int a,b,c;
		for(int i=0;i<n;i++){
			a=scan.nextInt();
			b=scan.nextInt();
			c=scan.nextInt();
			if(isRight(a,b,c)==true)	System.out.println("YES");
			else System.out.println("NO");
		}
	}

} public class Main {
	
	static boolean isRight(int a, int b, int c) {
		if (a * a + b * b == c * c || a * a + c * c == b * b
				|| b * b + c * c == a * a) {
			return true;
		} else
			return false;
	}

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int a,b,c;
		for(int i=0;i<n;i++){
			a=scan.nextInt();
			b=scan.nextInt();
			c=scan.nextInt();
			if(isRight(a,b,c)==true)	System.out.println("YES");
			else System.out.println("NO");
		}
	}

} Main
import java.util.Scanner;

public class Main {
	
	static boolean isRight(int a, int b, int c) {
		if (a * a + b * b == c * c || a * a + c * c == b * b
				|| b * b + c * c == a * a) {
			return true;
		} else
			return false;
	}

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int a,b,c;
		for(int i=0;i<n;i++){
			a=scan.nextInt();
			b=scan.nextInt();
			c=scan.nextInt();
			if(isRight(a,b,c)==true)	System.out.println("YES");
			else System.out.println("NO");
		}
	}

}