import java.io.*;

public class Main {

	private static final int subNum = 3;
	private static final int adge1 = 0;
	private static final int adge2 = 1;
	private static final int adge3 = 2;

	public static void main(String[] a) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int num = Integer.parseInt(br.readLine());
		int[][] tryangle = new int[num][subNum];

		for (int i = 0; i < num; i++) {

			String str = br.readLine();
			String[] strBuf = str.split(" ");

			for (int j = 0; j < subNum; j++) {
				tryangle[i][j] = Integer.parseInt(strBuf[j]);
			}
		}
		
		int x, y, z;
		for (int i = 0; i < num; i++) {
			x = tryangle[i][adge1] * tryangle[i][adge1];
			y = tryangle[i][adge2] * tryangle[i][adge2];
			z = tryangle[i][adge3] * tryangle[i][adge3];
			if (((x + y) == z) || ((y + z) == x) || ((x + z) == y))
				System.out.println("YES");
			else
				System.out.println("NO");
		}
	}
}
/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz