import java.util.Scanner;

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 = sc.nextInt();
			int b = sc.nextInt();
			int c = sc.nextInt();
			System.out.println((a * a == b * b + c * c || b * b == a * a + c * c || c * c == a * a + b * b) ? "YES" : "NO");
		}
	}
} import java.util.Scanner; Scanner java.util 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 = sc.nextInt();
			int b = sc.nextInt();
			int c = sc.nextInt();
			System.out.println((a * a == b * b + c * c || b * b == a * a + c * c || c * c == a * a + b * b) ? "YES" : "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 = sc.nextInt();
			int b = sc.nextInt();
			int c = sc.nextInt();
			System.out.println((a * a == b * b + c * c || b * b == a * a + c * c || c * c == a * a + b * b) ? "YES" : "NO");
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		for (int i = 0; i < n; i++)
		{
			int a = sc.nextInt();
			int b = sc.nextInt();
			int c = sc.nextInt();
			System.out.println((a * a == b * b + c * c || b * b == a * a + c * c || c * c == a * a + b * b) ? "YES" : "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 = sc.nextInt();
			int b = sc.nextInt();
			int c = sc.nextInt();
			System.out.println((a * a == b * b + c * c || b * b == a * a + c * c || c * c == a * a + b * b) ? "YES" : "NO");
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			int a = sc.nextInt();
			int b = sc.nextInt();
			int c = sc.nextInt();
			System.out.println((a * a == b * b + c * c || b * b == a * a + c * c || c * c == a * a + b * b) ? "YES" : "NO");
		} {
			int a = sc.nextInt();
			int b = sc.nextInt();
			int c = sc.nextInt();
			System.out.println((a * a == b * b + c * c || b * b == a * a + c * c || c * c == a * a + b * b) ? "YES" : "NO");
		} int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc int c = sc.nextInt(); c sc.nextInt() sc.nextInt sc System.out.println((a * a == b * b + c * c || b * b == a * a + c * c || c * c == a * a + b * b) ? "YES" : "NO") System.out.println System.out System System.out (a * a == b * b + c * c || b * b == a * a + c * c || c * c == a * a + b * b) ? "YES" : "NO" (a * a == b * b + c * c || b * b == a * a + c * c || c * c == a * a + b * b) a * a == b * b + c * c || b * b == a * a + c * c || c * c == a * a + b * b a * a == b * b + c * c a * a a a b * b + c * c b * b b b c * c c c b * b == a * a + c * c b * b b b a * a + c * c a * a a a c * c c c c * c == a * a + b * b c * c c c a * a + b * b a * a a a b * b b b "YES" "NO" String args[] args
import java.util.Scanner;

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 = sc.nextInt();
			int b = sc.nextInt();
			int c = sc.nextInt();
			System.out.println((a * a == b * b + c * c || b * b == a * a + c * c || c * c == a * a + b * b) ? "YES" : "NO");
		}
	}
}