import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args)
	{
		Scanner stdIn = new Scanner(System.in);

		List<String> list = new ArrayList<String>();

		int number = stdIn.nextInt();

		for(int i = 0; i < number; i++)
		{
			int a = (int) Math.pow(stdIn.nextInt(), 2);
			int b = (int) Math.pow(stdIn.nextInt(), 2);
			int c = (int) Math.pow(stdIn.nextInt(), 2);

			if (a + b == c || a + c == b || b + c == a)
			{
				list.add("YES");
			} else
			{
				list.add("NO");
			}
		}

		for (String str : list)
		{
			System.out.println(str);
		}
	}
} import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args)
	{
		Scanner stdIn = new Scanner(System.in);

		List<String> list = new ArrayList<String>();

		int number = stdIn.nextInt();

		for(int i = 0; i < number; i++)
		{
			int a = (int) Math.pow(stdIn.nextInt(), 2);
			int b = (int) Math.pow(stdIn.nextInt(), 2);
			int c = (int) Math.pow(stdIn.nextInt(), 2);

			if (a + b == c || a + c == b || b + c == a)
			{
				list.add("YES");
			} else
			{
				list.add("NO");
			}
		}

		for (String str : list)
		{
			System.out.println(str);
		}
	}
} Main public static void main(String[] args)
	{
		Scanner stdIn = new Scanner(System.in);

		List<String> list = new ArrayList<String>();

		int number = stdIn.nextInt();

		for(int i = 0; i < number; i++)
		{
			int a = (int) Math.pow(stdIn.nextInt(), 2);
			int b = (int) Math.pow(stdIn.nextInt(), 2);
			int c = (int) Math.pow(stdIn.nextInt(), 2);

			if (a + b == c || a + c == b || b + c == a)
			{
				list.add("YES");
			} else
			{
				list.add("NO");
			}
		}

		for (String str : list)
		{
			System.out.println(str);
		}
	} main {
		Scanner stdIn = new Scanner(System.in);

		List<String> list = new ArrayList<String>();

		int number = stdIn.nextInt();

		for(int i = 0; i < number; i++)
		{
			int a = (int) Math.pow(stdIn.nextInt(), 2);
			int b = (int) Math.pow(stdIn.nextInt(), 2);
			int c = (int) Math.pow(stdIn.nextInt(), 2);

			if (a + b == c || a + c == b || b + c == a)
			{
				list.add("YES");
			} else
			{
				list.add("NO");
			}
		}

		for (String str : list)
		{
			System.out.println(str);
		}
	} Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) List<String> list = new ArrayList<String>(); list new ArrayList<String>() int number = stdIn.nextInt(); number stdIn.nextInt() stdIn.nextInt stdIn for(int i = 0; i < number; i++)
		{
			int a = (int) Math.pow(stdIn.nextInt(), 2);
			int b = (int) Math.pow(stdIn.nextInt(), 2);
			int c = (int) Math.pow(stdIn.nextInt(), 2);

			if (a + b == c || a + c == b || b + c == a)
			{
				list.add("YES");
			} else
			{
				list.add("NO");
			}
		} int i = 0; int i = 0; i 0 i < number i number i++ i++ i {
			int a = (int) Math.pow(stdIn.nextInt(), 2);
			int b = (int) Math.pow(stdIn.nextInt(), 2);
			int c = (int) Math.pow(stdIn.nextInt(), 2);

			if (a + b == c || a + c == b || b + c == a)
			{
				list.add("YES");
			} else
			{
				list.add("NO");
			}
		} {
			int a = (int) Math.pow(stdIn.nextInt(), 2);
			int b = (int) Math.pow(stdIn.nextInt(), 2);
			int c = (int) Math.pow(stdIn.nextInt(), 2);

			if (a + b == c || a + c == b || b + c == a)
			{
				list.add("YES");
			} else
			{
				list.add("NO");
			}
		} int a = (int) Math.pow(stdIn.nextInt(), 2); a (int) Math.pow(stdIn.nextInt(), 2) Math.pow Math stdIn.nextInt() stdIn.nextInt stdIn 2 int b = (int) Math.pow(stdIn.nextInt(), 2); b (int) Math.pow(stdIn.nextInt(), 2) Math.pow Math stdIn.nextInt() stdIn.nextInt stdIn 2 int c = (int) Math.pow(stdIn.nextInt(), 2); c (int) Math.pow(stdIn.nextInt(), 2) Math.pow Math stdIn.nextInt() stdIn.nextInt stdIn 2 if (a + b == c || a + c == b || b + c == a)
			{
				list.add("YES");
			} else
			{
				list.add("NO");
			} a + b == c || a + c == b || b + c == a a + b == c || a + c == b || b + c == a a + b == c a + b a b c a + c == b a + c a c b b + c == a b + c b c a {
				list.add("YES");
			} list.add("YES") list.add list "YES" {
				list.add("NO");
			} list.add("NO") list.add list "NO" for (String str : list)
		{
			System.out.println(str);
		} String str list {
			System.out.println(str);
		} {
			System.out.println(str);
		} System.out.println(str) System.out.println System.out System System.out str String[] args args public class Main {

	public static void main(String[] args)
	{
		Scanner stdIn = new Scanner(System.in);

		List<String> list = new ArrayList<String>();

		int number = stdIn.nextInt();

		for(int i = 0; i < number; i++)
		{
			int a = (int) Math.pow(stdIn.nextInt(), 2);
			int b = (int) Math.pow(stdIn.nextInt(), 2);
			int c = (int) Math.pow(stdIn.nextInt(), 2);

			if (a + b == c || a + c == b || b + c == a)
			{
				list.add("YES");
			} else
			{
				list.add("NO");
			}
		}

		for (String str : list)
		{
			System.out.println(str);
		}
	}
} public class Main {

	public static void main(String[] args)
	{
		Scanner stdIn = new Scanner(System.in);

		List<String> list = new ArrayList<String>();

		int number = stdIn.nextInt();

		for(int i = 0; i < number; i++)
		{
			int a = (int) Math.pow(stdIn.nextInt(), 2);
			int b = (int) Math.pow(stdIn.nextInt(), 2);
			int c = (int) Math.pow(stdIn.nextInt(), 2);

			if (a + b == c || a + c == b || b + c == a)
			{
				list.add("YES");
			} else
			{
				list.add("NO");
			}
		}

		for (String str : list)
		{
			System.out.println(str);
		}
	}
} Main
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args)
	{
		Scanner stdIn = new Scanner(System.in);

		List<String> list = new ArrayList<String>();

		int number = stdIn.nextInt();

		for(int i = 0; i < number; i++)
		{
			int a = (int) Math.pow(stdIn.nextInt(), 2);
			int b = (int) Math.pow(stdIn.nextInt(), 2);
			int c = (int) Math.pow(stdIn.nextInt(), 2);

			if (a + b == c || a + c == b || b + c == a)
			{
				list.add("YES");
			} else
			{
				list.add("NO");
			}
		}

		for (String str : list)
		{
			System.out.println(str);
		}
	}
}