import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws IOException {
		int size = readInt();
		for (int i = 0; i < size; i++) {
			boolean yes = false;
			int[] a = readInts();
			for (int j = 0; j < a.length; j++) {
				a[j] *= a[j];
			}
			for (int j = 0; j < a.length && !yes; j++) {
				yes = (a[j] == (a[(1 + j) % 3] + a[(2 + j) % 3]));
			}
			System.out.println(yes ? "YES" : "NO");
		}

	}

	static BufferedReader br = new BufferedReader(new InputStreamReader(
			System.in));

	private static int[] readInts() throws IOException {
		String readLine = br.readLine();
		if (readLine == null) {
			return null;
		}
		String[] s = readLine.split(" ");
		int[] result = new int[s.length];
		for (int i = 0; i < result.length; i++)
			result[i] = Integer.parseInt(s[i], 10);

		return result;
	}

	private static int readInt() throws IOException {
		return Integer.parseInt(br.readLine(), 10);
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

	public static void main(String[] args) throws IOException {
		int size = readInt();
		for (int i = 0; i < size; i++) {
			boolean yes = false;
			int[] a = readInts();
			for (int j = 0; j < a.length; j++) {
				a[j] *= a[j];
			}
			for (int j = 0; j < a.length && !yes; j++) {
				yes = (a[j] == (a[(1 + j) % 3] + a[(2 + j) % 3]));
			}
			System.out.println(yes ? "YES" : "NO");
		}

	}

	static BufferedReader br = new BufferedReader(new InputStreamReader(
			System.in));

	private static int[] readInts() throws IOException {
		String readLine = br.readLine();
		if (readLine == null) {
			return null;
		}
		String[] s = readLine.split(" ");
		int[] result = new int[s.length];
		for (int i = 0; i < result.length; i++)
			result[i] = Integer.parseInt(s[i], 10);

		return result;
	}

	private static int readInt() throws IOException {
		return Integer.parseInt(br.readLine(), 10);
	}
} Main static BufferedReader br = new BufferedReader(new InputStreamReader(
			System.in)); br new BufferedReader(new InputStreamReader(
			System.in)) public static void main(String[] args) throws IOException {
		int size = readInt();
		for (int i = 0; i < size; i++) {
			boolean yes = false;
			int[] a = readInts();
			for (int j = 0; j < a.length; j++) {
				a[j] *= a[j];
			}
			for (int j = 0; j < a.length && !yes; j++) {
				yes = (a[j] == (a[(1 + j) % 3] + a[(2 + j) % 3]));
			}
			System.out.println(yes ? "YES" : "NO");
		}

	} main {
		int size = readInt();
		for (int i = 0; i < size; i++) {
			boolean yes = false;
			int[] a = readInts();
			for (int j = 0; j < a.length; j++) {
				a[j] *= a[j];
			}
			for (int j = 0; j < a.length && !yes; j++) {
				yes = (a[j] == (a[(1 + j) % 3] + a[(2 + j) % 3]));
			}
			System.out.println(yes ? "YES" : "NO");
		}

	} int size = readInt(); size readInt() readInt for (int i = 0; i < size; i++) {
			boolean yes = false;
			int[] a = readInts();
			for (int j = 0; j < a.length; j++) {
				a[j] *= a[j];
			}
			for (int j = 0; j < a.length && !yes; j++) {
				yes = (a[j] == (a[(1 + j) % 3] + a[(2 + j) % 3]));
			}
			System.out.println(yes ? "YES" : "NO");
		} int i = 0; int i = 0; i 0 i < size i size i++ i++ i {
			boolean yes = false;
			int[] a = readInts();
			for (int j = 0; j < a.length; j++) {
				a[j] *= a[j];
			}
			for (int j = 0; j < a.length && !yes; j++) {
				yes = (a[j] == (a[(1 + j) % 3] + a[(2 + j) % 3]));
			}
			System.out.println(yes ? "YES" : "NO");
		} {
			boolean yes = false;
			int[] a = readInts();
			for (int j = 0; j < a.length; j++) {
				a[j] *= a[j];
			}
			for (int j = 0; j < a.length && !yes; j++) {
				yes = (a[j] == (a[(1 + j) % 3] + a[(2 + j) % 3]));
			}
			System.out.println(yes ? "YES" : "NO");
		} boolean yes = false; yes false int[] a = readInts(); a readInts() readInts for (int j = 0; j < a.length; j++) {
				a[j] *= a[j];
			} int j = 0; int j = 0; j 0 j < a.length j a.length a a.length j++ j++ j {
				a[j] *= a[j];
			} {
				a[j] *= a[j];
			} a[j] *= a[j] a[j] a j a[j] a j for (int j = 0; j < a.length && !yes; j++) {
				yes = (a[j] == (a[(1 + j) % 3] + a[(2 + j) % 3]));
			} int j = 0; int j = 0; j 0 j < a.length && !yes j < a.length j a.length a a.length !yes yes j++ j++ j {
				yes = (a[j] == (a[(1 + j) % 3] + a[(2 + j) % 3]));
			} {
				yes = (a[j] == (a[(1 + j) % 3] + a[(2 + j) % 3]));
			} yes = (a[j] == (a[(1 + j) % 3] + a[(2 + j) % 3])) yes (a[j] == (a[(1 + j) % 3] + a[(2 + j) % 3])) a[j] a j (a[(1 + j) % 3] + a[(2 + j) % 3]) a[(1 + j) % 3] a (1 + j) % 3 (1 + j) 1 j 3 a[(2 + j) % 3] a (2 + j) % 3 (2 + j) 2 j 3 System.out.println(yes ? "YES" : "NO") System.out.println System.out System System.out yes ? "YES" : "NO" yes "YES" "NO" String[] args args private static int[] readInts() throws IOException {
		String readLine = br.readLine();
		if (readLine == null) {
			return null;
		}
		String[] s = readLine.split(" ");
		int[] result = new int[s.length];
		for (int i = 0; i < result.length; i++)
			result[i] = Integer.parseInt(s[i], 10);

		return result;
	} readInts {
		String readLine = br.readLine();
		if (readLine == null) {
			return null;
		}
		String[] s = readLine.split(" ");
		int[] result = new int[s.length];
		for (int i = 0; i < result.length; i++)
			result[i] = Integer.parseInt(s[i], 10);

		return result;
	} String readLine = br.readLine(); readLine br.readLine() br.readLine br if (readLine == null) {
			return null;
		} readLine == null readLine null {
			return null;
		} return null; null String[] s = readLine.split(" "); s readLine.split(" ") readLine.split readLine " " int[] result = new int[s.length]; result new int[s.length] s.length s s.length for (int i = 0; i < result.length; i++)
			result[i] = Integer.parseInt(s[i], 10); int i = 0; int i = 0; i 0 i < result.length i result.length result result.length i++ i++ i result[i] = Integer.parseInt(s[i], 10); result[i] = Integer.parseInt(s[i], 10) result[i] result i Integer.parseInt(s[i], 10) Integer.parseInt Integer s[i] s i 10 return result; result private static int readInt() throws IOException {
		return Integer.parseInt(br.readLine(), 10);
	} readInt {
		return Integer.parseInt(br.readLine(), 10);
	} return Integer.parseInt(br.readLine(), 10); Integer.parseInt(br.readLine(), 10) Integer.parseInt Integer br.readLine() br.readLine br 10 public class Main {

	public static void main(String[] args) throws IOException {
		int size = readInt();
		for (int i = 0; i < size; i++) {
			boolean yes = false;
			int[] a = readInts();
			for (int j = 0; j < a.length; j++) {
				a[j] *= a[j];
			}
			for (int j = 0; j < a.length && !yes; j++) {
				yes = (a[j] == (a[(1 + j) % 3] + a[(2 + j) % 3]));
			}
			System.out.println(yes ? "YES" : "NO");
		}

	}

	static BufferedReader br = new BufferedReader(new InputStreamReader(
			System.in));

	private static int[] readInts() throws IOException {
		String readLine = br.readLine();
		if (readLine == null) {
			return null;
		}
		String[] s = readLine.split(" ");
		int[] result = new int[s.length];
		for (int i = 0; i < result.length; i++)
			result[i] = Integer.parseInt(s[i], 10);

		return result;
	}

	private static int readInt() throws IOException {
		return Integer.parseInt(br.readLine(), 10);
	}
} public class Main {

	public static void main(String[] args) throws IOException {
		int size = readInt();
		for (int i = 0; i < size; i++) {
			boolean yes = false;
			int[] a = readInts();
			for (int j = 0; j < a.length; j++) {
				a[j] *= a[j];
			}
			for (int j = 0; j < a.length && !yes; j++) {
				yes = (a[j] == (a[(1 + j) % 3] + a[(2 + j) % 3]));
			}
			System.out.println(yes ? "YES" : "NO");
		}

	}

	static BufferedReader br = new BufferedReader(new InputStreamReader(
			System.in));

	private static int[] readInts() throws IOException {
		String readLine = br.readLine();
		if (readLine == null) {
			return null;
		}
		String[] s = readLine.split(" ");
		int[] result = new int[s.length];
		for (int i = 0; i < result.length; i++)
			result[i] = Integer.parseInt(s[i], 10);

		return result;
	}

	private static int readInt() throws IOException {
		return Integer.parseInt(br.readLine(), 10);
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws IOException {
		int size = readInt();
		for (int i = 0; i < size; i++) {
			boolean yes = false;
			int[] a = readInts();
			for (int j = 0; j < a.length; j++) {
				a[j] *= a[j];
			}
			for (int j = 0; j < a.length && !yes; j++) {
				yes = (a[j] == (a[(1 + j) % 3] + a[(2 + j) % 3]));
			}
			System.out.println(yes ? "YES" : "NO");
		}

	}

	static BufferedReader br = new BufferedReader(new InputStreamReader(
			System.in));

	private static int[] readInts() throws IOException {
		String readLine = br.readLine();
		if (readLine == null) {
			return null;
		}
		String[] s = readLine.split(" ");
		int[] result = new int[s.length];
		for (int i = 0; i < result.length; i++)
			result[i] = Integer.parseInt(s[i], 10);

		return result;
	}

	private static int readInt() throws IOException {
		return Integer.parseInt(br.readLine(), 10);
	}
}