import java.util.Scanner;
import java.util.Vector;
import java.util.Collections;

class Main
{
	public static void main(String[] av)
	{
		Scanner sc = new Scanner( System.in );
		int num = sc.nextInt();

		Vector<Boolean> bools = new Vector<Boolean>();
		for ( int i = 0; i < num; ++i )
		{
			Vector<Integer> ps = new Vector<Integer>();
			for ( int j = 0; j < 3; j++ )
			{
				ps.add( sc.nextInt() );
			}
			Collections.sort( ps );
			if ( ps.get(0)*ps.get(0) + ps.get(1)*ps.get(1)
				== ps.get(2)*ps.get(2) )
			{
				bools.add( true );
			}
			else
			{
				bools.add( false );
			}
		}
		for ( Boolean bool: bools )
		{
			if ( bool )
			{
				System.out.println("YES");
			}
			else
			{
				System.out.println("NO");
			}
		}
	}
}
				
		 import java.util.Scanner; Scanner java.util import java.util.Vector; Vector java.util import java.util.Collections; Collections java.util class Main
{
	public static void main(String[] av)
	{
		Scanner sc = new Scanner( System.in );
		int num = sc.nextInt();

		Vector<Boolean> bools = new Vector<Boolean>();
		for ( int i = 0; i < num; ++i )
		{
			Vector<Integer> ps = new Vector<Integer>();
			for ( int j = 0; j < 3; j++ )
			{
				ps.add( sc.nextInt() );
			}
			Collections.sort( ps );
			if ( ps.get(0)*ps.get(0) + ps.get(1)*ps.get(1)
				== ps.get(2)*ps.get(2) )
			{
				bools.add( true );
			}
			else
			{
				bools.add( false );
			}
		}
		for ( Boolean bool: bools )
		{
			if ( bool )
			{
				System.out.println("YES");
			}
			else
			{
				System.out.println("NO");
			}
		}
	}
} Main public static void main(String[] av)
	{
		Scanner sc = new Scanner( System.in );
		int num = sc.nextInt();

		Vector<Boolean> bools = new Vector<Boolean>();
		for ( int i = 0; i < num; ++i )
		{
			Vector<Integer> ps = new Vector<Integer>();
			for ( int j = 0; j < 3; j++ )
			{
				ps.add( sc.nextInt() );
			}
			Collections.sort( ps );
			if ( ps.get(0)*ps.get(0) + ps.get(1)*ps.get(1)
				== ps.get(2)*ps.get(2) )
			{
				bools.add( true );
			}
			else
			{
				bools.add( false );
			}
		}
		for ( Boolean bool: bools )
		{
			if ( bool )
			{
				System.out.println("YES");
			}
			else
			{
				System.out.println("NO");
			}
		}
	} main {
		Scanner sc = new Scanner( System.in );
		int num = sc.nextInt();

		Vector<Boolean> bools = new Vector<Boolean>();
		for ( int i = 0; i < num; ++i )
		{
			Vector<Integer> ps = new Vector<Integer>();
			for ( int j = 0; j < 3; j++ )
			{
				ps.add( sc.nextInt() );
			}
			Collections.sort( ps );
			if ( ps.get(0)*ps.get(0) + ps.get(1)*ps.get(1)
				== ps.get(2)*ps.get(2) )
			{
				bools.add( true );
			}
			else
			{
				bools.add( false );
			}
		}
		for ( Boolean bool: bools )
		{
			if ( bool )
			{
				System.out.println("YES");
			}
			else
			{
				System.out.println("NO");
			}
		}
	} Scanner sc = new Scanner( System.in ); sc new Scanner( System.in ) int num = sc.nextInt(); num sc.nextInt() sc.nextInt sc Vector<Boolean> bools = new Vector<Boolean>(); bools new Vector<Boolean>() for ( int i = 0; i < num; ++i )
		{
			Vector<Integer> ps = new Vector<Integer>();
			for ( int j = 0; j < 3; j++ )
			{
				ps.add( sc.nextInt() );
			}
			Collections.sort( ps );
			if ( ps.get(0)*ps.get(0) + ps.get(1)*ps.get(1)
				== ps.get(2)*ps.get(2) )
			{
				bools.add( true );
			}
			else
			{
				bools.add( false );
			}
		} int i = 0; int i = 0; i 0 i < num i num ++i ++i i {
			Vector<Integer> ps = new Vector<Integer>();
			for ( int j = 0; j < 3; j++ )
			{
				ps.add( sc.nextInt() );
			}
			Collections.sort( ps );
			if ( ps.get(0)*ps.get(0) + ps.get(1)*ps.get(1)
				== ps.get(2)*ps.get(2) )
			{
				bools.add( true );
			}
			else
			{
				bools.add( false );
			}
		} {
			Vector<Integer> ps = new Vector<Integer>();
			for ( int j = 0; j < 3; j++ )
			{
				ps.add( sc.nextInt() );
			}
			Collections.sort( ps );
			if ( ps.get(0)*ps.get(0) + ps.get(1)*ps.get(1)
				== ps.get(2)*ps.get(2) )
			{
				bools.add( true );
			}
			else
			{
				bools.add( false );
			}
		} Vector<Integer> ps = new Vector<Integer>(); ps new Vector<Integer>() for ( int j = 0; j < 3; j++ )
			{
				ps.add( sc.nextInt() );
			} int j = 0; int j = 0; j 0 j < 3 j 3 j++ j++ j {
				ps.add( sc.nextInt() );
			} {
				ps.add( sc.nextInt() );
			} ps.add( sc.nextInt() ) ps.add ps sc.nextInt() sc.nextInt sc Collections.sort( ps ) Collections.sort Collections ps if ( ps.get(0)*ps.get(0) + ps.get(1)*ps.get(1)
				== ps.get(2)*ps.get(2) )
			{
				bools.add( true );
			}
			else
			{
				bools.add( false );
			} ps.get(0)*ps.get(0) + ps.get(1)*ps.get(1)
				== ps.get(2)*ps.get(2) ps.get(0)*ps.get(0) + ps.get(1)*ps.get(1) ps.get(0)*ps.get(0) ps.get(0) ps.get ps 0 ps.get(0) ps.get ps 0 ps.get(1)*ps.get(1) ps.get(1) ps.get ps 1 ps.get(1) ps.get ps 1 ps.get(2)*ps.get(2) ps.get(2) ps.get ps 2 ps.get(2) ps.get ps 2 {
				bools.add( true );
			} bools.add( true ) bools.add bools true {
				bools.add( false );
			} bools.add( false ) bools.add bools false for ( Boolean bool: bools )
		{
			if ( bool )
			{
				System.out.println("YES");
			}
			else
			{
				System.out.println("NO");
			}
		} Boolean bool bools {
			if ( bool )
			{
				System.out.println("YES");
			}
			else
			{
				System.out.println("NO");
			}
		} {
			if ( bool )
			{
				System.out.println("YES");
			}
			else
			{
				System.out.println("NO");
			}
		} if ( bool )
			{
				System.out.println("YES");
			}
			else
			{
				System.out.println("NO");
			} bool {
				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[] av av
import java.util.Scanner;
import java.util.Vector;
import java.util.Collections;

class Main
{
	public static void main(String[] av)
	{
		Scanner sc = new Scanner( System.in );
		int num = sc.nextInt();

		Vector<Boolean> bools = new Vector<Boolean>();
		for ( int i = 0; i < num; ++i )
		{
			Vector<Integer> ps = new Vector<Integer>();
			for ( int j = 0; j < 3; j++ )
			{
				ps.add( sc.nextInt() );
			}
			Collections.sort( ps );
			if ( ps.get(0)*ps.get(0) + ps.get(1)*ps.get(1)
				== ps.get(2)*ps.get(2) )
			{
				bools.add( true );
			}
			else
			{
				bools.add( false );
			}
		}
		for ( Boolean bool: bools )
		{
			if ( bool )
			{
				System.out.println("YES");
			}
			else
			{
				System.out.println("NO");
			}
		}
	}
}
				
		