import java.util.Scanner;
import java.util.Arrays;

public class Main
{
	public static void main(String[] args)
	{
		Scanner cin = new Scanner(System.in);
		
		int n,t;
		int[] data = new int[3];

		n = cin.nextInt();
		while(n-- > 0)
		{
			for(int i=0; i<3; i++)
			{
				t = cin.nextInt();
				data[i] = t*t;
			}
			Arrays.sort(data);
			
			if(data[0]+data[1] == data[2])
			{
				System.out.println("YES");
			}
			else
			{
				System.out.println("NO");
			}
		}
	}
} import java.util.Scanner; Scanner java.util import java.util.Arrays; Arrays java.util public class Main
{
	public static void main(String[] args)
	{
		Scanner cin = new Scanner(System.in);
		
		int n,t;
		int[] data = new int[3];

		n = cin.nextInt();
		while(n-- > 0)
		{
			for(int i=0; i<3; i++)
			{
				t = cin.nextInt();
				data[i] = t*t;
			}
			Arrays.sort(data);
			
			if(data[0]+data[1] == data[2])
			{
				System.out.println("YES");
			}
			else
			{
				System.out.println("NO");
			}
		}
	}
} Main public static void main(String[] args)
	{
		Scanner cin = new Scanner(System.in);
		
		int n,t;
		int[] data = new int[3];

		n = cin.nextInt();
		while(n-- > 0)
		{
			for(int i=0; i<3; i++)
			{
				t = cin.nextInt();
				data[i] = t*t;
			}
			Arrays.sort(data);
			
			if(data[0]+data[1] == data[2])
			{
				System.out.println("YES");
			}
			else
			{
				System.out.println("NO");
			}
		}
	} main {
		Scanner cin = new Scanner(System.in);
		
		int n,t;
		int[] data = new int[3];

		n = cin.nextInt();
		while(n-- > 0)
		{
			for(int i=0; i<3; i++)
			{
				t = cin.nextInt();
				data[i] = t*t;
			}
			Arrays.sort(data);
			
			if(data[0]+data[1] == data[2])
			{
				System.out.println("YES");
			}
			else
			{
				System.out.println("NO");
			}
		}
	} Scanner cin = new Scanner(System.in); cin new Scanner(System.in) int n n t; t int[] data = new int[3]; data new int[3] 3 n = cin.nextInt() n cin.nextInt() cin.nextInt cin while(n-- > 0)
		{
			for(int i=0; i<3; i++)
			{
				t = cin.nextInt();
				data[i] = t*t;
			}
			Arrays.sort(data);
			
			if(data[0]+data[1] == data[2])
			{
				System.out.println("YES");
			}
			else
			{
				System.out.println("NO");
			}
		} n-- > 0 n-- n 0 {
			for(int i=0; i<3; i++)
			{
				t = cin.nextInt();
				data[i] = t*t;
			}
			Arrays.sort(data);
			
			if(data[0]+data[1] == data[2])
			{
				System.out.println("YES");
			}
			else
			{
				System.out.println("NO");
			}
		} for(int i=0; i<3; i++)
			{
				t = cin.nextInt();
				data[i] = t*t;
			} int i=0; int i=0; i 0 i<3 i 3 i++ i++ i {
				t = cin.nextInt();
				data[i] = t*t;
			} {
				t = cin.nextInt();
				data[i] = t*t;
			} t = cin.nextInt() t cin.nextInt() cin.nextInt cin data[i] = t*t data[i] data i t*t t t Arrays.sort(data) Arrays.sort Arrays data if(data[0]+data[1] == data[2])
			{
				System.out.println("YES");
			}
			else
			{
				System.out.println("NO");
			} data[0]+data[1] == data[2] data[0]+data[1] data[0] data 0 data[1] data 1 data[2] data 2 {
				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 class Main
{
	public static void main(String[] args)
	{
		Scanner cin = new Scanner(System.in);
		
		int n,t;
		int[] data = new int[3];

		n = cin.nextInt();
		while(n-- > 0)
		{
			for(int i=0; i<3; i++)
			{
				t = cin.nextInt();
				data[i] = t*t;
			}
			Arrays.sort(data);
			
			if(data[0]+data[1] == data[2])
			{
				System.out.println("YES");
			}
			else
			{
				System.out.println("NO");
			}
		}
	}
} public class Main
{
	public static void main(String[] args)
	{
		Scanner cin = new Scanner(System.in);
		
		int n,t;
		int[] data = new int[3];

		n = cin.nextInt();
		while(n-- > 0)
		{
			for(int i=0; i<3; i++)
			{
				t = cin.nextInt();
				data[i] = t*t;
			}
			Arrays.sort(data);
			
			if(data[0]+data[1] == data[2])
			{
				System.out.println("YES");
			}
			else
			{
				System.out.println("NO");
			}
		}
	}
} Main
import java.util.Scanner;
import java.util.Arrays;

public class Main
{
	public static void main(String[] args)
	{
		Scanner cin = new Scanner(System.in);
		
		int n,t;
		int[] data = new int[3];

		n = cin.nextInt();
		while(n-- > 0)
		{
			for(int i=0; i<3; i++)
			{
				t = cin.nextInt();
				data[i] = t*t;
			}
			Arrays.sort(data);
			
			if(data[0]+data[1] == data[2])
			{
				System.out.println("YES");
			}
			else
			{
				System.out.println("NO");
			}
		}
	}
}