import java.util.Scanner;

class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int count = sc.nextInt();
		if (count <= 1000) {
			String[] triangles = new String[count];
			for (int j = 0; j < count; j++) {
				int side1 = sc.nextInt();
				int side2 = sc.nextInt();
				int side3 = sc.nextInt();
				if (side1 >= 1 && side1 <= 1000) {
					if (side2 >= 1 && side2 <= 1000) {
						if (side3 >= 1 && side3 <= 1000) {
							String result = isRightTriangle(side1, side2, side3);
							triangles[j] = result;
						}
					}
				}
			}
			for (int k = 0; k < count; k++) {
				System.out.println(triangles[k]);
			}
		}
	}

	private static String isRightTriangle(int s1, int s2, int s3) {
		String test = "NO";
		if ((s1 * s1) == (s2 * s2) + (s3 * s3)) {
			test = "YES";
		} else if ((s2 * s2) == (s1 * s1) + (s3 * s3)) {
			test = "YES";
		} else if ((s3 * s3) == (s1 * s1) + (s2 * s2)) {
			test = "YES";
		}
		return test;
	}
} import java.util.Scanner; Scanner java.util class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int count = sc.nextInt();
		if (count <= 1000) {
			String[] triangles = new String[count];
			for (int j = 0; j < count; j++) {
				int side1 = sc.nextInt();
				int side2 = sc.nextInt();
				int side3 = sc.nextInt();
				if (side1 >= 1 && side1 <= 1000) {
					if (side2 >= 1 && side2 <= 1000) {
						if (side3 >= 1 && side3 <= 1000) {
							String result = isRightTriangle(side1, side2, side3);
							triangles[j] = result;
						}
					}
				}
			}
			for (int k = 0; k < count; k++) {
				System.out.println(triangles[k]);
			}
		}
	}

	private static String isRightTriangle(int s1, int s2, int s3) {
		String test = "NO";
		if ((s1 * s1) == (s2 * s2) + (s3 * s3)) {
			test = "YES";
		} else if ((s2 * s2) == (s1 * s1) + (s3 * s3)) {
			test = "YES";
		} else if ((s3 * s3) == (s1 * s1) + (s2 * s2)) {
			test = "YES";
		}
		return test;
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int count = sc.nextInt();
		if (count <= 1000) {
			String[] triangles = new String[count];
			for (int j = 0; j < count; j++) {
				int side1 = sc.nextInt();
				int side2 = sc.nextInt();
				int side3 = sc.nextInt();
				if (side1 >= 1 && side1 <= 1000) {
					if (side2 >= 1 && side2 <= 1000) {
						if (side3 >= 1 && side3 <= 1000) {
							String result = isRightTriangle(side1, side2, side3);
							triangles[j] = result;
						}
					}
				}
			}
			for (int k = 0; k < count; k++) {
				System.out.println(triangles[k]);
			}
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int count = sc.nextInt();
		if (count <= 1000) {
			String[] triangles = new String[count];
			for (int j = 0; j < count; j++) {
				int side1 = sc.nextInt();
				int side2 = sc.nextInt();
				int side3 = sc.nextInt();
				if (side1 >= 1 && side1 <= 1000) {
					if (side2 >= 1 && side2 <= 1000) {
						if (side3 >= 1 && side3 <= 1000) {
							String result = isRightTriangle(side1, side2, side3);
							triangles[j] = result;
						}
					}
				}
			}
			for (int k = 0; k < count; k++) {
				System.out.println(triangles[k]);
			}
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int count = sc.nextInt(); count sc.nextInt() sc.nextInt sc if (count <= 1000) {
			String[] triangles = new String[count];
			for (int j = 0; j < count; j++) {
				int side1 = sc.nextInt();
				int side2 = sc.nextInt();
				int side3 = sc.nextInt();
				if (side1 >= 1 && side1 <= 1000) {
					if (side2 >= 1 && side2 <= 1000) {
						if (side3 >= 1 && side3 <= 1000) {
							String result = isRightTriangle(side1, side2, side3);
							triangles[j] = result;
						}
					}
				}
			}
			for (int k = 0; k < count; k++) {
				System.out.println(triangles[k]);
			}
		} count <= 1000 count 1000 {
			String[] triangles = new String[count];
			for (int j = 0; j < count; j++) {
				int side1 = sc.nextInt();
				int side2 = sc.nextInt();
				int side3 = sc.nextInt();
				if (side1 >= 1 && side1 <= 1000) {
					if (side2 >= 1 && side2 <= 1000) {
						if (side3 >= 1 && side3 <= 1000) {
							String result = isRightTriangle(side1, side2, side3);
							triangles[j] = result;
						}
					}
				}
			}
			for (int k = 0; k < count; k++) {
				System.out.println(triangles[k]);
			}
		} String[] triangles = new String[count]; triangles new String[count] count for (int j = 0; j < count; j++) {
				int side1 = sc.nextInt();
				int side2 = sc.nextInt();
				int side3 = sc.nextInt();
				if (side1 >= 1 && side1 <= 1000) {
					if (side2 >= 1 && side2 <= 1000) {
						if (side3 >= 1 && side3 <= 1000) {
							String result = isRightTriangle(side1, side2, side3);
							triangles[j] = result;
						}
					}
				}
			} int j = 0; int j = 0; j 0 j < count j count j++ j++ j {
				int side1 = sc.nextInt();
				int side2 = sc.nextInt();
				int side3 = sc.nextInt();
				if (side1 >= 1 && side1 <= 1000) {
					if (side2 >= 1 && side2 <= 1000) {
						if (side3 >= 1 && side3 <= 1000) {
							String result = isRightTriangle(side1, side2, side3);
							triangles[j] = result;
						}
					}
				}
			} {
				int side1 = sc.nextInt();
				int side2 = sc.nextInt();
				int side3 = sc.nextInt();
				if (side1 >= 1 && side1 <= 1000) {
					if (side2 >= 1 && side2 <= 1000) {
						if (side3 >= 1 && side3 <= 1000) {
							String result = isRightTriangle(side1, side2, side3);
							triangles[j] = result;
						}
					}
				}
			} int side1 = sc.nextInt(); side1 sc.nextInt() sc.nextInt sc int side2 = sc.nextInt(); side2 sc.nextInt() sc.nextInt sc int side3 = sc.nextInt(); side3 sc.nextInt() sc.nextInt sc if (side1 >= 1 && side1 <= 1000) {
					if (side2 >= 1 && side2 <= 1000) {
						if (side3 >= 1 && side3 <= 1000) {
							String result = isRightTriangle(side1, side2, side3);
							triangles[j] = result;
						}
					}
				} side1 >= 1 && side1 <= 1000 side1 >= 1 side1 1 side1 <= 1000 side1 1000 {
					if (side2 >= 1 && side2 <= 1000) {
						if (side3 >= 1 && side3 <= 1000) {
							String result = isRightTriangle(side1, side2, side3);
							triangles[j] = result;
						}
					}
				} if (side2 >= 1 && side2 <= 1000) {
						if (side3 >= 1 && side3 <= 1000) {
							String result = isRightTriangle(side1, side2, side3);
							triangles[j] = result;
						}
					} side2 >= 1 && side2 <= 1000 side2 >= 1 side2 1 side2 <= 1000 side2 1000 {
						if (side3 >= 1 && side3 <= 1000) {
							String result = isRightTriangle(side1, side2, side3);
							triangles[j] = result;
						}
					} if (side3 >= 1 && side3 <= 1000) {
							String result = isRightTriangle(side1, side2, side3);
							triangles[j] = result;
						} side3 >= 1 && side3 <= 1000 side3 >= 1 side3 1 side3 <= 1000 side3 1000 {
							String result = isRightTriangle(side1, side2, side3);
							triangles[j] = result;
						} String result = isRightTriangle(side1, side2, side3); result isRightTriangle(side1, side2, side3) isRightTriangle side1 side2 side3 triangles[j] = result triangles[j] triangles j result for (int k = 0; k < count; k++) {
				System.out.println(triangles[k]);
			} int k = 0; int k = 0; k 0 k < count k count k++ k++ k {
				System.out.println(triangles[k]);
			} {
				System.out.println(triangles[k]);
			} System.out.println(triangles[k]) System.out.println System.out System System.out triangles[k] triangles k String[] args args private static String isRightTriangle(int s1, int s2, int s3) {
		String test = "NO";
		if ((s1 * s1) == (s2 * s2) + (s3 * s3)) {
			test = "YES";
		} else if ((s2 * s2) == (s1 * s1) + (s3 * s3)) {
			test = "YES";
		} else if ((s3 * s3) == (s1 * s1) + (s2 * s2)) {
			test = "YES";
		}
		return test;
	} isRightTriangle {
		String test = "NO";
		if ((s1 * s1) == (s2 * s2) + (s3 * s3)) {
			test = "YES";
		} else if ((s2 * s2) == (s1 * s1) + (s3 * s3)) {
			test = "YES";
		} else if ((s3 * s3) == (s1 * s1) + (s2 * s2)) {
			test = "YES";
		}
		return test;
	} String test = "NO"; test "NO" if ((s1 * s1) == (s2 * s2) + (s3 * s3)) {
			test = "YES";
		} else if ((s2 * s2) == (s1 * s1) + (s3 * s3)) {
			test = "YES";
		} else if ((s3 * s3) == (s1 * s1) + (s2 * s2)) {
			test = "YES";
		} (s1 * s1) == (s2 * s2) + (s3 * s3) (s1 * s1) s1 s1 (s2 * s2) + (s3 * s3) (s2 * s2) s2 s2 (s3 * s3) s3 s3 {
			test = "YES";
		} test = "YES" test "YES" if ((s2 * s2) == (s1 * s1) + (s3 * s3)) {
			test = "YES";
		} else if ((s3 * s3) == (s1 * s1) + (s2 * s2)) {
			test = "YES";
		} (s2 * s2) == (s1 * s1) + (s3 * s3) (s2 * s2) s2 s2 (s1 * s1) + (s3 * s3) (s1 * s1) s1 s1 (s3 * s3) s3 s3 {
			test = "YES";
		} test = "YES" test "YES" if ((s3 * s3) == (s1 * s1) + (s2 * s2)) {
			test = "YES";
		} (s3 * s3) == (s1 * s1) + (s2 * s2) (s3 * s3) s3 s3 (s1 * s1) + (s2 * s2) (s1 * s1) s1 s1 (s2 * s2) s2 s2 {
			test = "YES";
		} test = "YES" test "YES" return test; test int s1 s1 int s2 s2 int s3 s3
import java.util.Scanner;

class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int count = sc.nextInt();
		if (count <= 1000) {
			String[] triangles = new String[count];
			for (int j = 0; j < count; j++) {
				int side1 = sc.nextInt();
				int side2 = sc.nextInt();
				int side3 = sc.nextInt();
				if (side1 >= 1 && side1 <= 1000) {
					if (side2 >= 1 && side2 <= 1000) {
						if (side3 >= 1 && side3 <= 1000) {
							String result = isRightTriangle(side1, side2, side3);
							triangles[j] = result;
						}
					}
				}
			}
			for (int k = 0; k < count; k++) {
				System.out.println(triangles[k]);
			}
		}
	}

	private static String isRightTriangle(int s1, int s2, int s3) {
		String test = "NO";
		if ((s1 * s1) == (s2 * s2) + (s3 * s3)) {
			test = "YES";
		} else if ((s2 * s2) == (s1 * s1) + (s3 * s3)) {
			test = "YES";
		} else if ((s3 * s3) == (s1 * s1) + (s2 * s2)) {
			test = "YES";
		}
		return test;
	}
}