import java.util.Scanner;

public class Main
{
	public static void main(String[] args)
	{
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		
		for(int i=0; i<n; i++)
		{
			int[] a = new int[3];
			for(int j=0; j<3; j++)
			{
				a[j] = scanner.nextInt();
			}
			
			for(int j=1; j<3; j++)
			{
				if(a[0] < a[j])
				{
					int buf = a[0];
					a[0] = a[j];
					a[j] = buf;
				}
			}
			System.out.println( (a[0]*a[0]==a[1]*a[1]+a[2]*a[2]) ? "YES" : "NO");
		}
	}
} import java.util.Scanner; Scanner java.util public class Main
{
	public static void main(String[] args)
	{
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		
		for(int i=0; i<n; i++)
		{
			int[] a = new int[3];
			for(int j=0; j<3; j++)
			{
				a[j] = scanner.nextInt();
			}
			
			for(int j=1; j<3; j++)
			{
				if(a[0] < a[j])
				{
					int buf = a[0];
					a[0] = a[j];
					a[j] = buf;
				}
			}
			System.out.println( (a[0]*a[0]==a[1]*a[1]+a[2]*a[2]) ? "YES" : "NO");
		}
	}
} Main public static void main(String[] args)
	{
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		
		for(int i=0; i<n; i++)
		{
			int[] a = new int[3];
			for(int j=0; j<3; j++)
			{
				a[j] = scanner.nextInt();
			}
			
			for(int j=1; j<3; j++)
			{
				if(a[0] < a[j])
				{
					int buf = a[0];
					a[0] = a[j];
					a[j] = buf;
				}
			}
			System.out.println( (a[0]*a[0]==a[1]*a[1]+a[2]*a[2]) ? "YES" : "NO");
		}
	} main {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		
		for(int i=0; i<n; i++)
		{
			int[] a = new int[3];
			for(int j=0; j<3; j++)
			{
				a[j] = scanner.nextInt();
			}
			
			for(int j=1; j<3; j++)
			{
				if(a[0] < a[j])
				{
					int buf = a[0];
					a[0] = a[j];
					a[j] = buf;
				}
			}
			System.out.println( (a[0]*a[0]==a[1]*a[1]+a[2]*a[2]) ? "YES" : "NO");
		}
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int n = scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner for(int i=0; i<n; i++)
		{
			int[] a = new int[3];
			for(int j=0; j<3; j++)
			{
				a[j] = scanner.nextInt();
			}
			
			for(int j=1; j<3; j++)
			{
				if(a[0] < a[j])
				{
					int buf = a[0];
					a[0] = a[j];
					a[j] = buf;
				}
			}
			System.out.println( (a[0]*a[0]==a[1]*a[1]+a[2]*a[2]) ? "YES" : "NO");
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			int[] a = new int[3];
			for(int j=0; j<3; j++)
			{
				a[j] = scanner.nextInt();
			}
			
			for(int j=1; j<3; j++)
			{
				if(a[0] < a[j])
				{
					int buf = a[0];
					a[0] = a[j];
					a[j] = buf;
				}
			}
			System.out.println( (a[0]*a[0]==a[1]*a[1]+a[2]*a[2]) ? "YES" : "NO");
		} {
			int[] a = new int[3];
			for(int j=0; j<3; j++)
			{
				a[j] = scanner.nextInt();
			}
			
			for(int j=1; j<3; j++)
			{
				if(a[0] < a[j])
				{
					int buf = a[0];
					a[0] = a[j];
					a[j] = buf;
				}
			}
			System.out.println( (a[0]*a[0]==a[1]*a[1]+a[2]*a[2]) ? "YES" : "NO");
		} int[] a = new int[3]; a new int[3] 3 for(int j=0; j<3; j++)
			{
				a[j] = scanner.nextInt();
			} int j=0; int j=0; j 0 j<3 j 3 j++ j++ j {
				a[j] = scanner.nextInt();
			} {
				a[j] = scanner.nextInt();
			} a[j] = scanner.nextInt() a[j] a j scanner.nextInt() scanner.nextInt scanner for(int j=1; j<3; j++)
			{
				if(a[0] < a[j])
				{
					int buf = a[0];
					a[0] = a[j];
					a[j] = buf;
				}
			} int j=1; int j=1; j 1 j<3 j 3 j++ j++ j {
				if(a[0] < a[j])
				{
					int buf = a[0];
					a[0] = a[j];
					a[j] = buf;
				}
			} {
				if(a[0] < a[j])
				{
					int buf = a[0];
					a[0] = a[j];
					a[j] = buf;
				}
			} if(a[0] < a[j])
				{
					int buf = a[0];
					a[0] = a[j];
					a[j] = buf;
				} a[0] < a[j] a[0] a 0 a[j] a j {
					int buf = a[0];
					a[0] = a[j];
					a[j] = buf;
				} int buf = a[0]; buf a[0] a 0 a[0] = a[j] a[0] a 0 a[j] a j a[j] = buf a[j] a j buf System.out.println( (a[0]*a[0]==a[1]*a[1]+a[2]*a[2]) ? "YES" : "NO") System.out.println System.out System System.out (a[0]*a[0]==a[1]*a[1]+a[2]*a[2]) ? "YES" : "NO" (a[0]*a[0]==a[1]*a[1]+a[2]*a[2]) a[0]*a[0] a[0] a 0 a[0] a 0 a[1]*a[1]+a[2]*a[2] a[1]*a[1] a[1] a 1 a[1] a 1 a[2]*a[2] a[2] a 2 a[2] a 2 "YES" "NO" String[] args args public class Main
{
	public static void main(String[] args)
	{
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		
		for(int i=0; i<n; i++)
		{
			int[] a = new int[3];
			for(int j=0; j<3; j++)
			{
				a[j] = scanner.nextInt();
			}
			
			for(int j=1; j<3; j++)
			{
				if(a[0] < a[j])
				{
					int buf = a[0];
					a[0] = a[j];
					a[j] = buf;
				}
			}
			System.out.println( (a[0]*a[0]==a[1]*a[1]+a[2]*a[2]) ? "YES" : "NO");
		}
	}
} public class Main
{
	public static void main(String[] args)
	{
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		
		for(int i=0; i<n; i++)
		{
			int[] a = new int[3];
			for(int j=0; j<3; j++)
			{
				a[j] = scanner.nextInt();
			}
			
			for(int j=1; j<3; j++)
			{
				if(a[0] < a[j])
				{
					int buf = a[0];
					a[0] = a[j];
					a[j] = buf;
				}
			}
			System.out.println( (a[0]*a[0]==a[1]*a[1]+a[2]*a[2]) ? "YES" : "NO");
		}
	}
} Main
import java.util.Scanner;

public class Main
{
	public static void main(String[] args)
	{
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		
		for(int i=0; i<n; i++)
		{
			int[] a = new int[3];
			for(int j=0; j<3; j++)
			{
				a[j] = scanner.nextInt();
			}
			
			for(int j=1; j<3; j++)
			{
				if(a[0] < a[j])
				{
					int buf = a[0];
					a[0] = a[j];
					a[j] = buf;
				}
			}
			System.out.println( (a[0]*a[0]==a[1]*a[1]+a[2]*a[2]) ? "YES" : "NO");
		}
	}
}