using System;
using System.Linq;
public class Program {
	public static void Main() {
		int n = int.Parse(Console.ReadLine());
		for(int i = 0; i < n; i++) {
			string[] s = Console.ReadLine().Split();
			int[] a = new int[3];
			for(int j = 0; j < 3; j++) a[j] = int.Parse(s[j]);
			Array.Sort(a);
			Console.WriteLine(((a[0] * a[0] + a[1] * a[1] == a[2] * a[2]) ? "YES" : "NO"));
		}
	}
}