import java.util.*;

public class Main{

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

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

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

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

public class Main{

	public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		int n=scan.nextInt();
		int[][]a=new int[n][3];
		
		for(int j=0;j<n;j++)
			for(int l=0;l<3;l++)
			a[j][l]=scan.nextInt();
			
		for(int i=0;i<n;i++)
			{Arrays.sort(a[i]);	
			if(a[i][0]*a[i][0]+a[i][1]*a[i][1]==a[i][2]*a[i][2])
				System.out.println("YES");
			else
				System.out.println("NO");
			}
}}