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");
		}
	}
} import java.io.*; io.* java 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");
		}
	}
} Main private static final int subNum = 3; subNum 3 private static final int adge1 = 0; adge1 0 private static final int adge2 = 1; adge2 1 private static final int adge3 = 2; 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");
		}
	} main {
		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");
		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int num = Integer.parseInt(br.readLine()); num Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br int[][] tryangle = new int[num][subNum]; tryangle new int[num][subNum] 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 i = 0; int i = 0; i 0 i < num i num i++ i++ i {

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

			for (int j = 0; j < subNum; j++) {
				tryangle[i][j] = Integer.parseInt(strBuf[j]);
			}
		} {

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

			for (int j = 0; j < subNum; j++) {
				tryangle[i][j] = Integer.parseInt(strBuf[j]);
			}
		} String str = br.readLine(); str br.readLine() br.readLine br String[] strBuf = str.split(" "); strBuf str.split(" ") str.split str " " for (int j = 0; j < subNum; j++) {
				tryangle[i][j] = Integer.parseInt(strBuf[j]);
			} int j = 0; int j = 0; j 0 j < subNum j subNum j++ j++ j {
				tryangle[i][j] = Integer.parseInt(strBuf[j]);
			} {
				tryangle[i][j] = Integer.parseInt(strBuf[j]);
			} tryangle[i][j] = Integer.parseInt(strBuf[j]) tryangle[i][j] tryangle[i] tryangle i j Integer.parseInt(strBuf[j]) Integer.parseInt Integer strBuf[j] strBuf j int x x y y z; 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");
		} int i = 0; int i = 0; i 0 i < num i num i++ i++ 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");
		} {
			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");
		} x = tryangle[i][adge1] * tryangle[i][adge1] x tryangle[i][adge1] * tryangle[i][adge1] tryangle[i][adge1] tryangle[i] tryangle i adge1 tryangle[i][adge1] tryangle[i] tryangle i adge1 y = tryangle[i][adge2] * tryangle[i][adge2] y tryangle[i][adge2] * tryangle[i][adge2] tryangle[i][adge2] tryangle[i] tryangle i adge2 tryangle[i][adge2] tryangle[i] tryangle i adge2 z = tryangle[i][adge3] * tryangle[i][adge3] z tryangle[i][adge3] * tryangle[i][adge3] tryangle[i][adge3] tryangle[i] tryangle i adge3 tryangle[i][adge3] tryangle[i] tryangle i adge3 if (((x + y) == z) || ((y + z) == x) || ((x + z) == y))
				System.out.println("YES");
			else
				System.out.println("NO"); ((x + y) == z) || ((y + z) == x) || ((x + z) == y) ((x + y) == z) || ((y + z) == x) || ((x + z) == y) ((x + y) == z) (x + y) x y z ((y + z) == x) (y + z) y z x ((x + z) == y) (x + z) x z y System.out.println("YES") System.out.println System.out System System.out "YES" System.out.println("NO") System.out.println System.out System System.out "NO" String[] a a 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");
		}
	}
} 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");
		}
	}
} Main
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");
		}
	}
}