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

class Main {
	public static void main(String[] args) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String line;
		try {
			br.readLine();
			while ((line = br.readLine()) != null) {
				String[] v = line.split(" ");
				int a = Integer.parseInt(v[0]);
				int b = Integer.parseInt(v[1]);
				int c = Integer.parseInt(v[2]);
				int max = Math.max(Math.max(a, b), c);

				if (max == a) {
					if (a * a == b * b + c * c) {
						System.out.println("YES");
					} else {
						System.out.println("NO");
					}
				} else if (max == b) {
					if (b * b == a * a + c * c) {
						System.out.println("YES");
					} else {
						System.out.println("NO");
					}
				} else {
					if (c * c == a * a + b * b) {
						System.out.println("YES");
					} else {
						System.out.println("NO");
					}
				}
			}
		} catch (Exception e) {
		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io class Main {
	public static void main(String[] args) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String line;
		try {
			br.readLine();
			while ((line = br.readLine()) != null) {
				String[] v = line.split(" ");
				int a = Integer.parseInt(v[0]);
				int b = Integer.parseInt(v[1]);
				int c = Integer.parseInt(v[2]);
				int max = Math.max(Math.max(a, b), c);

				if (max == a) {
					if (a * a == b * b + c * c) {
						System.out.println("YES");
					} else {
						System.out.println("NO");
					}
				} else if (max == b) {
					if (b * b == a * a + c * c) {
						System.out.println("YES");
					} else {
						System.out.println("NO");
					}
				} else {
					if (c * c == a * a + b * b) {
						System.out.println("YES");
					} else {
						System.out.println("NO");
					}
				}
			}
		} catch (Exception e) {
		}
	}
} Main public static void main(String[] args) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String line;
		try {
			br.readLine();
			while ((line = br.readLine()) != null) {
				String[] v = line.split(" ");
				int a = Integer.parseInt(v[0]);
				int b = Integer.parseInt(v[1]);
				int c = Integer.parseInt(v[2]);
				int max = Math.max(Math.max(a, b), c);

				if (max == a) {
					if (a * a == b * b + c * c) {
						System.out.println("YES");
					} else {
						System.out.println("NO");
					}
				} else if (max == b) {
					if (b * b == a * a + c * c) {
						System.out.println("YES");
					} else {
						System.out.println("NO");
					}
				} else {
					if (c * c == a * a + b * b) {
						System.out.println("YES");
					} else {
						System.out.println("NO");
					}
				}
			}
		} catch (Exception e) {
		}
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String line;
		try {
			br.readLine();
			while ((line = br.readLine()) != null) {
				String[] v = line.split(" ");
				int a = Integer.parseInt(v[0]);
				int b = Integer.parseInt(v[1]);
				int c = Integer.parseInt(v[2]);
				int max = Math.max(Math.max(a, b), c);

				if (max == a) {
					if (a * a == b * b + c * c) {
						System.out.println("YES");
					} else {
						System.out.println("NO");
					}
				} else if (max == b) {
					if (b * b == a * a + c * c) {
						System.out.println("YES");
					} else {
						System.out.println("NO");
					}
				} else {
					if (c * c == a * a + b * b) {
						System.out.println("YES");
					} else {
						System.out.println("NO");
					}
				}
			}
		} catch (Exception e) {
		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String line; line try {
			br.readLine();
			while ((line = br.readLine()) != null) {
				String[] v = line.split(" ");
				int a = Integer.parseInt(v[0]);
				int b = Integer.parseInt(v[1]);
				int c = Integer.parseInt(v[2]);
				int max = Math.max(Math.max(a, b), c);

				if (max == a) {
					if (a * a == b * b + c * c) {
						System.out.println("YES");
					} else {
						System.out.println("NO");
					}
				} else if (max == b) {
					if (b * b == a * a + c * c) {
						System.out.println("YES");
					} else {
						System.out.println("NO");
					}
				} else {
					if (c * c == a * a + b * b) {
						System.out.println("YES");
					} else {
						System.out.println("NO");
					}
				}
			}
		} catch (Exception e) {
		} catch (Exception e) {
		} Exception e {
		} {
			br.readLine();
			while ((line = br.readLine()) != null) {
				String[] v = line.split(" ");
				int a = Integer.parseInt(v[0]);
				int b = Integer.parseInt(v[1]);
				int c = Integer.parseInt(v[2]);
				int max = Math.max(Math.max(a, b), c);

				if (max == a) {
					if (a * a == b * b + c * c) {
						System.out.println("YES");
					} else {
						System.out.println("NO");
					}
				} else if (max == b) {
					if (b * b == a * a + c * c) {
						System.out.println("YES");
					} else {
						System.out.println("NO");
					}
				} else {
					if (c * c == a * a + b * b) {
						System.out.println("YES");
					} else {
						System.out.println("NO");
					}
				}
			}
		} br.readLine() br.readLine br while ((line = br.readLine()) != null) {
				String[] v = line.split(" ");
				int a = Integer.parseInt(v[0]);
				int b = Integer.parseInt(v[1]);
				int c = Integer.parseInt(v[2]);
				int max = Math.max(Math.max(a, b), c);

				if (max == a) {
					if (a * a == b * b + c * c) {
						System.out.println("YES");
					} else {
						System.out.println("NO");
					}
				} else if (max == b) {
					if (b * b == a * a + c * c) {
						System.out.println("YES");
					} else {
						System.out.println("NO");
					}
				} else {
					if (c * c == a * a + b * b) {
						System.out.println("YES");
					} else {
						System.out.println("NO");
					}
				}
			} (line = br.readLine()) != null (line = br.readLine()) line br.readLine() br.readLine br null {
				String[] v = line.split(" ");
				int a = Integer.parseInt(v[0]);
				int b = Integer.parseInt(v[1]);
				int c = Integer.parseInt(v[2]);
				int max = Math.max(Math.max(a, b), c);

				if (max == a) {
					if (a * a == b * b + c * c) {
						System.out.println("YES");
					} else {
						System.out.println("NO");
					}
				} else if (max == b) {
					if (b * b == a * a + c * c) {
						System.out.println("YES");
					} else {
						System.out.println("NO");
					}
				} else {
					if (c * c == a * a + b * b) {
						System.out.println("YES");
					} else {
						System.out.println("NO");
					}
				}
			} String[] v = line.split(" "); v line.split(" ") line.split line " " int a = Integer.parseInt(v[0]); a Integer.parseInt(v[0]) Integer.parseInt Integer v[0] v 0 int b = Integer.parseInt(v[1]); b Integer.parseInt(v[1]) Integer.parseInt Integer v[1] v 1 int c = Integer.parseInt(v[2]); c Integer.parseInt(v[2]) Integer.parseInt Integer v[2] v 2 int max = Math.max(Math.max(a, b), c); max Math.max(Math.max(a, b), c) Math.max Math Math.max(a, b) Math.max Math a b c if (max == a) {
					if (a * a == b * b + c * c) {
						System.out.println("YES");
					} else {
						System.out.println("NO");
					}
				} else if (max == b) {
					if (b * b == a * a + c * c) {
						System.out.println("YES");
					} else {
						System.out.println("NO");
					}
				} else {
					if (c * c == a * a + b * b) {
						System.out.println("YES");
					} else {
						System.out.println("NO");
					}
				} max == a max a {
					if (a * a == b * b + c * c) {
						System.out.println("YES");
					} else {
						System.out.println("NO");
					}
				} if (a * a == b * b + c * c) {
						System.out.println("YES");
					} else {
						System.out.println("NO");
					} a * a == b * b + c * c a * a a a b * b + c * c b * b b b c * c c c {
						System.out.println("YES");
					} System.out.println("YES") System.out.println System.out System System.out "YES" {
						System.out.println("NO");
					} System.out.println("NO") System.out.println System.out System System.out "NO" if (max == b) {
					if (b * b == a * a + c * c) {
						System.out.println("YES");
					} else {
						System.out.println("NO");
					}
				} else {
					if (c * c == a * a + b * b) {
						System.out.println("YES");
					} else {
						System.out.println("NO");
					}
				} max == b max b {
					if (b * b == a * a + c * c) {
						System.out.println("YES");
					} else {
						System.out.println("NO");
					}
				} if (b * b == a * a + c * c) {
						System.out.println("YES");
					} else {
						System.out.println("NO");
					} b * b == a * a + c * c b * b b b a * a + c * c a * a a a c * c c c {
						System.out.println("YES");
					} System.out.println("YES") System.out.println System.out System System.out "YES" {
						System.out.println("NO");
					} System.out.println("NO") System.out.println System.out System System.out "NO" {
					if (c * c == a * a + b * b) {
						System.out.println("YES");
					} else {
						System.out.println("NO");
					}
				} if (c * c == a * a + b * b) {
						System.out.println("YES");
					} else {
						System.out.println("NO");
					} c * c == a * a + b * b c * c c c a * a + b * b a * a a a b * b b b {
						System.out.println("YES");
					} System.out.println("YES") System.out.println System.out System System.out "YES" {
						System.out.println("NO");
					} System.out.println("NO") System.out.println System.out System System.out "NO" String[] args args
import java.io.BufferedReader;
import java.io.InputStreamReader;

class Main {
	public static void main(String[] args) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String line;
		try {
			br.readLine();
			while ((line = br.readLine()) != null) {
				String[] v = line.split(" ");
				int a = Integer.parseInt(v[0]);
				int b = Integer.parseInt(v[1]);
				int c = Integer.parseInt(v[2]);
				int max = Math.max(Math.max(a, b), c);

				if (max == a) {
					if (a * a == b * b + c * c) {
						System.out.println("YES");
					} else {
						System.out.println("NO");
					}
				} else if (max == b) {
					if (b * b == a * a + c * c) {
						System.out.println("YES");
					} else {
						System.out.println("NO");
					}
				} else {
					if (c * c == a * a + b * b) {
						System.out.println("YES");
					} else {
						System.out.println("NO");
					}
				}
			}
		} catch (Exception e) {
		}
	}
}