class Main
{
	public static void main( String[] args )
	{
		java.util.Scanner sc = new java.util.Scanner( System.in );
		
		int n = sc.nextInt();
		while( n != 0 )
		{
			n--;
			
			int a = sc.nextInt();
			int b = sc.nextInt();
			int c = sc.nextInt();
			
			if( check( a, b, c ) ){
				System.out.println( "YES" );
			}else{
				System.out.println( "NO" );
			}
		}
	}
	static boolean check( int a, int b, int c )
	{
		if( a*a == b*b + c*c )return true;
		if( b*b == c*c + a*a )return true;
		if( c*c == a*a + b*b )return true;
		
		return false;
	}
} class Main
{
	public static void main( String[] args )
	{
		java.util.Scanner sc = new java.util.Scanner( System.in );
		
		int n = sc.nextInt();
		while( n != 0 )
		{
			n--;
			
			int a = sc.nextInt();
			int b = sc.nextInt();
			int c = sc.nextInt();
			
			if( check( a, b, c ) ){
				System.out.println( "YES" );
			}else{
				System.out.println( "NO" );
			}
		}
	}
	static boolean check( int a, int b, int c )
	{
		if( a*a == b*b + c*c )return true;
		if( b*b == c*c + a*a )return true;
		if( c*c == a*a + b*b )return true;
		
		return false;
	}
} Main public static void main( String[] args )
	{
		java.util.Scanner sc = new java.util.Scanner( System.in );
		
		int n = sc.nextInt();
		while( n != 0 )
		{
			n--;
			
			int a = sc.nextInt();
			int b = sc.nextInt();
			int c = sc.nextInt();
			
			if( check( a, b, c ) ){
				System.out.println( "YES" );
			}else{
				System.out.println( "NO" );
			}
		}
	} main {
		java.util.Scanner sc = new java.util.Scanner( System.in );
		
		int n = sc.nextInt();
		while( n != 0 )
		{
			n--;
			
			int a = sc.nextInt();
			int b = sc.nextInt();
			int c = sc.nextInt();
			
			if( check( a, b, c ) ){
				System.out.println( "YES" );
			}else{
				System.out.println( "NO" );
			}
		}
	} java.util.Scanner sc = new java.util.Scanner( System.in ); sc new java.util.Scanner( System.in ) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc while( n != 0 )
		{
			n--;
			
			int a = sc.nextInt();
			int b = sc.nextInt();
			int c = sc.nextInt();
			
			if( check( a, b, c ) ){
				System.out.println( "YES" );
			}else{
				System.out.println( "NO" );
			}
		} n != 0 n 0 {
			n--;
			
			int a = sc.nextInt();
			int b = sc.nextInt();
			int c = sc.nextInt();
			
			if( check( a, b, c ) ){
				System.out.println( "YES" );
			}else{
				System.out.println( "NO" );
			}
		} n-- n 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 if( check( a, b, c ) ){
				System.out.println( "YES" );
			}else{
				System.out.println( "NO" );
			} check( a, b, c ) check a b c {
				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 static boolean check( int a, int b, int c )
	{
		if( a*a == b*b + c*c )return true;
		if( b*b == c*c + a*a )return true;
		if( c*c == a*a + b*b )return true;
		
		return false;
	} check {
		if( a*a == b*b + c*c )return true;
		if( b*b == c*c + a*a )return true;
		if( c*c == a*a + b*b )return true;
		
		return false;
	} if( a*a == b*b + c*c )return true; a*a == b*b + c*c a*a a a b*b + c*c b*b b b c*c c c return true; true if( b*b == c*c + a*a )return true; b*b == c*c + a*a b*b b b c*c + a*a c*c c c a*a a a return true; true if( c*c == a*a + b*b )return true; c*c == a*a + b*b c*c c c a*a + b*b a*a a a b*b b b return true; true return false; false int a a int b b int c c
class Main
{
	public static void main( String[] args )
	{
		java.util.Scanner sc = new java.util.Scanner( System.in );
		
		int n = sc.nextInt();
		while( n != 0 )
		{
			n--;
			
			int a = sc.nextInt();
			int b = sc.nextInt();
			int c = sc.nextInt();
			
			if( check( a, b, c ) ){
				System.out.println( "YES" );
			}else{
				System.out.println( "NO" );
			}
		}
	}
	static boolean check( int a, int b, int c )
	{
		if( a*a == b*b + c*c )return true;
		if( b*b == c*c + a*a )return true;
		if( c*c == a*a + b*b )return true;
		
		return false;
	}
}