import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Main{
	private final static String NEGATIVE = "NO\n";
	private final static String AFFIRMATIVE = "YES\n";

	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in), 512);
		int number = Integer.parseInt(br.readLine());//行数
		int sides[] = new int[3];
		int productAB;//辺abの積
		StringTokenizer tknz;
		StringBuilder builder = new StringBuilder();

		for (; 0 < number; number--) {
			tknz = new StringTokenizer(br.readLine());
			for (int i = 0; i < 3; i++) {
				sides[i] = Integer.parseInt(tknz.nextToken());
			}
			Arrays.sort(sides);
			if (((productAB = sides[0] * sides[1]) % 12) != 0) {
				builder.append(NEGATIVE);
			} else if (productAB * sides[2] % 60 != 0) {
				builder.append(NEGATIVE);
			} else if (Math.pow(sides[0], 2) + Math.pow(sides[1], 2) != Math.pow(sides[2], 2)) {
				builder.append(NEGATIVE);
			} else {
				builder.append(AFFIRMATIVE);
			}
		}
		System.out.print(builder);
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Arrays; Arrays java.util import java.util.StringTokenizer; StringTokenizer java.util public class Main{
	private final static String NEGATIVE = "NO\n";
	private final static String AFFIRMATIVE = "YES\n";

	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in), 512);
		int number = Integer.parseInt(br.readLine());//行数
		int sides[] = new int[3];
		int productAB;//辺abの積
		StringTokenizer tknz;
		StringBuilder builder = new StringBuilder();

		for (; 0 < number; number--) {
			tknz = new StringTokenizer(br.readLine());
			for (int i = 0; i < 3; i++) {
				sides[i] = Integer.parseInt(tknz.nextToken());
			}
			Arrays.sort(sides);
			if (((productAB = sides[0] * sides[1]) % 12) != 0) {
				builder.append(NEGATIVE);
			} else if (productAB * sides[2] % 60 != 0) {
				builder.append(NEGATIVE);
			} else if (Math.pow(sides[0], 2) + Math.pow(sides[1], 2) != Math.pow(sides[2], 2)) {
				builder.append(NEGATIVE);
			} else {
				builder.append(AFFIRMATIVE);
			}
		}
		System.out.print(builder);
	}
} Main private final static String NEGATIVE = "NO\n"; NEGATIVE "NO\n" private final static String AFFIRMATIVE = "YES\n"; AFFIRMATIVE "YES\n" public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in), 512);
		int number = Integer.parseInt(br.readLine());//行数
		int sides[] = new int[3];
		int productAB;//辺abの積
		StringTokenizer tknz;
		StringBuilder builder = new StringBuilder();

		for (; 0 < number; number--) {
			tknz = new StringTokenizer(br.readLine());
			for (int i = 0; i < 3; i++) {
				sides[i] = Integer.parseInt(tknz.nextToken());
			}
			Arrays.sort(sides);
			if (((productAB = sides[0] * sides[1]) % 12) != 0) {
				builder.append(NEGATIVE);
			} else if (productAB * sides[2] % 60 != 0) {
				builder.append(NEGATIVE);
			} else if (Math.pow(sides[0], 2) + Math.pow(sides[1], 2) != Math.pow(sides[2], 2)) {
				builder.append(NEGATIVE);
			} else {
				builder.append(AFFIRMATIVE);
			}
		}
		System.out.print(builder);
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in), 512);
		int number = Integer.parseInt(br.readLine());//行数
		int sides[] = new int[3];
		int productAB;//辺abの積
		StringTokenizer tknz;
		StringBuilder builder = new StringBuilder();

		for (; 0 < number; number--) {
			tknz = new StringTokenizer(br.readLine());
			for (int i = 0; i < 3; i++) {
				sides[i] = Integer.parseInt(tknz.nextToken());
			}
			Arrays.sort(sides);
			if (((productAB = sides[0] * sides[1]) % 12) != 0) {
				builder.append(NEGATIVE);
			} else if (productAB * sides[2] % 60 != 0) {
				builder.append(NEGATIVE);
			} else if (Math.pow(sides[0], 2) + Math.pow(sides[1], 2) != Math.pow(sides[2], 2)) {
				builder.append(NEGATIVE);
			} else {
				builder.append(AFFIRMATIVE);
			}
		}
		System.out.print(builder);
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in), 512); br new BufferedReader(new InputStreamReader(System.in), 512) int number = Integer.parseInt(br.readLine()); number Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br int sides[] = new int[3]; sides new int[3] 3 int productAB; productAB StringTokenizer tknz; tknz StringBuilder builder = new StringBuilder(); builder new StringBuilder() for (; 0 < number; number--) {
			tknz = new StringTokenizer(br.readLine());
			for (int i = 0; i < 3; i++) {
				sides[i] = Integer.parseInt(tknz.nextToken());
			}
			Arrays.sort(sides);
			if (((productAB = sides[0] * sides[1]) % 12) != 0) {
				builder.append(NEGATIVE);
			} else if (productAB * sides[2] % 60 != 0) {
				builder.append(NEGATIVE);
			} else if (Math.pow(sides[0], 2) + Math.pow(sides[1], 2) != Math.pow(sides[2], 2)) {
				builder.append(NEGATIVE);
			} else {
				builder.append(AFFIRMATIVE);
			}
		} ; 0 < number 0 number number-- number-- number {
			tknz = new StringTokenizer(br.readLine());
			for (int i = 0; i < 3; i++) {
				sides[i] = Integer.parseInt(tknz.nextToken());
			}
			Arrays.sort(sides);
			if (((productAB = sides[0] * sides[1]) % 12) != 0) {
				builder.append(NEGATIVE);
			} else if (productAB * sides[2] % 60 != 0) {
				builder.append(NEGATIVE);
			} else if (Math.pow(sides[0], 2) + Math.pow(sides[1], 2) != Math.pow(sides[2], 2)) {
				builder.append(NEGATIVE);
			} else {
				builder.append(AFFIRMATIVE);
			}
		} {
			tknz = new StringTokenizer(br.readLine());
			for (int i = 0; i < 3; i++) {
				sides[i] = Integer.parseInt(tknz.nextToken());
			}
			Arrays.sort(sides);
			if (((productAB = sides[0] * sides[1]) % 12) != 0) {
				builder.append(NEGATIVE);
			} else if (productAB * sides[2] % 60 != 0) {
				builder.append(NEGATIVE);
			} else if (Math.pow(sides[0], 2) + Math.pow(sides[1], 2) != Math.pow(sides[2], 2)) {
				builder.append(NEGATIVE);
			} else {
				builder.append(AFFIRMATIVE);
			}
		} tknz = new StringTokenizer(br.readLine()) tknz new StringTokenizer(br.readLine()) for (int i = 0; i < 3; i++) {
				sides[i] = Integer.parseInt(tknz.nextToken());
			} int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {
				sides[i] = Integer.parseInt(tknz.nextToken());
			} {
				sides[i] = Integer.parseInt(tknz.nextToken());
			} sides[i] = Integer.parseInt(tknz.nextToken()) sides[i] sides i Integer.parseInt(tknz.nextToken()) Integer.parseInt Integer tknz.nextToken() tknz.nextToken tknz Arrays.sort(sides) Arrays.sort Arrays sides if (((productAB = sides[0] * sides[1]) % 12) != 0) {
				builder.append(NEGATIVE);
			} else if (productAB * sides[2] % 60 != 0) {
				builder.append(NEGATIVE);
			} else if (Math.pow(sides[0], 2) + Math.pow(sides[1], 2) != Math.pow(sides[2], 2)) {
				builder.append(NEGATIVE);
			} else {
				builder.append(AFFIRMATIVE);
			} ((productAB = sides[0] * sides[1]) % 12) != 0 ((productAB = sides[0] * sides[1]) % 12) (productAB = sides[0] * sides[1]) productAB sides[0] * sides[1] sides[0] sides 0 sides[1] sides 1 12 0 {
				builder.append(NEGATIVE);
			} builder.append(NEGATIVE) builder.append builder NEGATIVE if (productAB * sides[2] % 60 != 0) {
				builder.append(NEGATIVE);
			} else if (Math.pow(sides[0], 2) + Math.pow(sides[1], 2) != Math.pow(sides[2], 2)) {
				builder.append(NEGATIVE);
			} else {
				builder.append(AFFIRMATIVE);
			} productAB * sides[2] % 60 != 0 productAB * sides[2] % 60 productAB * sides[2] productAB sides[2] sides 2 60 0 {
				builder.append(NEGATIVE);
			} builder.append(NEGATIVE) builder.append builder NEGATIVE if (Math.pow(sides[0], 2) + Math.pow(sides[1], 2) != Math.pow(sides[2], 2)) {
				builder.append(NEGATIVE);
			} else {
				builder.append(AFFIRMATIVE);
			} Math.pow(sides[0], 2) + Math.pow(sides[1], 2) != Math.pow(sides[2], 2) Math.pow(sides[0], 2) + Math.pow(sides[1], 2) Math.pow(sides[0], 2) Math.pow Math sides[0] sides 0 2 Math.pow(sides[1], 2) Math.pow Math sides[1] sides 1 2 Math.pow(sides[2], 2) Math.pow Math sides[2] sides 2 2 {
				builder.append(NEGATIVE);
			} builder.append(NEGATIVE) builder.append builder NEGATIVE {
				builder.append(AFFIRMATIVE);
			} builder.append(AFFIRMATIVE) builder.append builder AFFIRMATIVE System.out.print(builder) System.out.print System.out System System.out builder String[] args args public class Main{
	private final static String NEGATIVE = "NO\n";
	private final static String AFFIRMATIVE = "YES\n";

	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in), 512);
		int number = Integer.parseInt(br.readLine());//行数
		int sides[] = new int[3];
		int productAB;//辺abの積
		StringTokenizer tknz;
		StringBuilder builder = new StringBuilder();

		for (; 0 < number; number--) {
			tknz = new StringTokenizer(br.readLine());
			for (int i = 0; i < 3; i++) {
				sides[i] = Integer.parseInt(tknz.nextToken());
			}
			Arrays.sort(sides);
			if (((productAB = sides[0] * sides[1]) % 12) != 0) {
				builder.append(NEGATIVE);
			} else if (productAB * sides[2] % 60 != 0) {
				builder.append(NEGATIVE);
			} else if (Math.pow(sides[0], 2) + Math.pow(sides[1], 2) != Math.pow(sides[2], 2)) {
				builder.append(NEGATIVE);
			} else {
				builder.append(AFFIRMATIVE);
			}
		}
		System.out.print(builder);
	}
} public class Main{
	private final static String NEGATIVE = "NO\n";
	private final static String AFFIRMATIVE = "YES\n";

	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in), 512);
		int number = Integer.parseInt(br.readLine());//行数
		int sides[] = new int[3];
		int productAB;//辺abの積
		StringTokenizer tknz;
		StringBuilder builder = new StringBuilder();

		for (; 0 < number; number--) {
			tknz = new StringTokenizer(br.readLine());
			for (int i = 0; i < 3; i++) {
				sides[i] = Integer.parseInt(tknz.nextToken());
			}
			Arrays.sort(sides);
			if (((productAB = sides[0] * sides[1]) % 12) != 0) {
				builder.append(NEGATIVE);
			} else if (productAB * sides[2] % 60 != 0) {
				builder.append(NEGATIVE);
			} else if (Math.pow(sides[0], 2) + Math.pow(sides[1], 2) != Math.pow(sides[2], 2)) {
				builder.append(NEGATIVE);
			} else {
				builder.append(AFFIRMATIVE);
			}
		}
		System.out.print(builder);
	}
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Main{
	private final static String NEGATIVE = "NO\n";
	private final static String AFFIRMATIVE = "YES\n";

	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in), 512);
		int number = Integer.parseInt(br.readLine());//行数
		int sides[] = new int[3];
		int productAB;//辺abの積
		StringTokenizer tknz;
		StringBuilder builder = new StringBuilder();

		for (; 0 < number; number--) {
			tknz = new StringTokenizer(br.readLine());
			for (int i = 0; i < 3; i++) {
				sides[i] = Integer.parseInt(tknz.nextToken());
			}
			Arrays.sort(sides);
			if (((productAB = sides[0] * sides[1]) % 12) != 0) {
				builder.append(NEGATIVE);
			} else if (productAB * sides[2] % 60 != 0) {
				builder.append(NEGATIVE);
			} else if (Math.pow(sides[0], 2) + Math.pow(sides[1], 2) != Math.pow(sides[2], 2)) {
				builder.append(NEGATIVE);
			} else {
				builder.append(AFFIRMATIVE);
			}
		}
		System.out.print(builder);
	}
}