import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.nextLine());
		for (int i = 0; i < n; i++) {
			int[] line = convertInt(sc.nextLine().split(" "));
			sort(line);
			if ((line[2] * line[2]) == ((line[0] * line[0]) + (line[1] * line[1]))) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		}
	}

	public static void sort(int[] array) {
		int n = array.length;
		for (int i = 0; i < n; i++) {
			for (int j = 1; j < n; j++) {
				if (array[j] < array[j - 1]) {
					int box = array[j - 1];
					array[j - 1] = array[j];
					array[j] = box;
				}
			}
		}
	}

	public static int[] convertInt(String[] str) {
		int n = str.length;
		int[] array = new int[n];
		for (int i = 0; i < n; i++) {
			array[i] = Integer.parseInt(str[i]);
		}
		return array;
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.nextLine());
		for (int i = 0; i < n; i++) {
			int[] line = convertInt(sc.nextLine().split(" "));
			sort(line);
			if ((line[2] * line[2]) == ((line[0] * line[0]) + (line[1] * line[1]))) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		}
	}

	public static void sort(int[] array) {
		int n = array.length;
		for (int i = 0; i < n; i++) {
			for (int j = 1; j < n; j++) {
				if (array[j] < array[j - 1]) {
					int box = array[j - 1];
					array[j - 1] = array[j];
					array[j] = box;
				}
			}
		}
	}

	public static int[] convertInt(String[] str) {
		int n = str.length;
		int[] array = new int[n];
		for (int i = 0; i < n; i++) {
			array[i] = Integer.parseInt(str[i]);
		}
		return array;
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.nextLine());
		for (int i = 0; i < n; i++) {
			int[] line = convertInt(sc.nextLine().split(" "));
			sort(line);
			if ((line[2] * line[2]) == ((line[0] * line[0]) + (line[1] * line[1]))) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.nextLine());
		for (int i = 0; i < n; i++) {
			int[] line = convertInt(sc.nextLine().split(" "));
			sort(line);
			if ((line[2] * line[2]) == ((line[0] * line[0]) + (line[1] * line[1]))) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.nextLine()); n Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc for (int i = 0; i < n; i++) {
			int[] line = convertInt(sc.nextLine().split(" "));
			sort(line);
			if ((line[2] * line[2]) == ((line[0] * line[0]) + (line[1] * line[1]))) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			int[] line = convertInt(sc.nextLine().split(" "));
			sort(line);
			if ((line[2] * line[2]) == ((line[0] * line[0]) + (line[1] * line[1]))) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		} {
			int[] line = convertInt(sc.nextLine().split(" "));
			sort(line);
			if ((line[2] * line[2]) == ((line[0] * line[0]) + (line[1] * line[1]))) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		} int[] line = convertInt(sc.nextLine().split(" ")); line convertInt(sc.nextLine().split(" ")) convertInt sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " sort(line) sort line if ((line[2] * line[2]) == ((line[0] * line[0]) + (line[1] * line[1]))) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			} (line[2] * line[2]) == ((line[0] * line[0]) + (line[1] * line[1])) (line[2] * line[2]) line[2] line 2 line[2] line 2 ((line[0] * line[0]) + (line[1] * line[1])) (line[0] * line[0]) line[0] line 0 line[0] line 0 (line[1] * line[1]) line[1] line 1 line[1] line 1 {
				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 public static void sort(int[] array) {
		int n = array.length;
		for (int i = 0; i < n; i++) {
			for (int j = 1; j < n; j++) {
				if (array[j] < array[j - 1]) {
					int box = array[j - 1];
					array[j - 1] = array[j];
					array[j] = box;
				}
			}
		}
	} sort {
		int n = array.length;
		for (int i = 0; i < n; i++) {
			for (int j = 1; j < n; j++) {
				if (array[j] < array[j - 1]) {
					int box = array[j - 1];
					array[j - 1] = array[j];
					array[j] = box;
				}
			}
		}
	} int n = array.length; n array.length array array.length for (int i = 0; i < n; i++) {
			for (int j = 1; j < n; j++) {
				if (array[j] < array[j - 1]) {
					int box = array[j - 1];
					array[j - 1] = array[j];
					array[j] = box;
				}
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			for (int j = 1; j < n; j++) {
				if (array[j] < array[j - 1]) {
					int box = array[j - 1];
					array[j - 1] = array[j];
					array[j] = box;
				}
			}
		} {
			for (int j = 1; j < n; j++) {
				if (array[j] < array[j - 1]) {
					int box = array[j - 1];
					array[j - 1] = array[j];
					array[j] = box;
				}
			}
		} for (int j = 1; j < n; j++) {
				if (array[j] < array[j - 1]) {
					int box = array[j - 1];
					array[j - 1] = array[j];
					array[j] = box;
				}
			} int j = 1; int j = 1; j 1 j < n j n j++ j++ j {
				if (array[j] < array[j - 1]) {
					int box = array[j - 1];
					array[j - 1] = array[j];
					array[j] = box;
				}
			} {
				if (array[j] < array[j - 1]) {
					int box = array[j - 1];
					array[j - 1] = array[j];
					array[j] = box;
				}
			} if (array[j] < array[j - 1]) {
					int box = array[j - 1];
					array[j - 1] = array[j];
					array[j] = box;
				} array[j] < array[j - 1] array[j] array j array[j - 1] array j - 1 j 1 {
					int box = array[j - 1];
					array[j - 1] = array[j];
					array[j] = box;
				} int box = array[j - 1]; box array[j - 1] array j - 1 j 1 array[j - 1] = array[j] array[j - 1] array j - 1 j 1 array[j] array j array[j] = box array[j] array j box int[] array array public static int[] convertInt(String[] str) {
		int n = str.length;
		int[] array = new int[n];
		for (int i = 0; i < n; i++) {
			array[i] = Integer.parseInt(str[i]);
		}
		return array;
	} convertInt {
		int n = str.length;
		int[] array = new int[n];
		for (int i = 0; i < n; i++) {
			array[i] = Integer.parseInt(str[i]);
		}
		return array;
	} int n = str.length; n str.length str str.length int[] array = new int[n]; array new int[n] n for (int i = 0; i < n; i++) {
			array[i] = Integer.parseInt(str[i]);
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			array[i] = Integer.parseInt(str[i]);
		} {
			array[i] = Integer.parseInt(str[i]);
		} array[i] = Integer.parseInt(str[i]) array[i] array i Integer.parseInt(str[i]) Integer.parseInt Integer str[i] str i return array; array String[] str str public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.nextLine());
		for (int i = 0; i < n; i++) {
			int[] line = convertInt(sc.nextLine().split(" "));
			sort(line);
			if ((line[2] * line[2]) == ((line[0] * line[0]) + (line[1] * line[1]))) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		}
	}

	public static void sort(int[] array) {
		int n = array.length;
		for (int i = 0; i < n; i++) {
			for (int j = 1; j < n; j++) {
				if (array[j] < array[j - 1]) {
					int box = array[j - 1];
					array[j - 1] = array[j];
					array[j] = box;
				}
			}
		}
	}

	public static int[] convertInt(String[] str) {
		int n = str.length;
		int[] array = new int[n];
		for (int i = 0; i < n; i++) {
			array[i] = Integer.parseInt(str[i]);
		}
		return array;
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.nextLine());
		for (int i = 0; i < n; i++) {
			int[] line = convertInt(sc.nextLine().split(" "));
			sort(line);
			if ((line[2] * line[2]) == ((line[0] * line[0]) + (line[1] * line[1]))) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		}
	}

	public static void sort(int[] array) {
		int n = array.length;
		for (int i = 0; i < n; i++) {
			for (int j = 1; j < n; j++) {
				if (array[j] < array[j - 1]) {
					int box = array[j - 1];
					array[j - 1] = array[j];
					array[j] = box;
				}
			}
		}
	}

	public static int[] convertInt(String[] str) {
		int n = str.length;
		int[] array = new int[n];
		for (int i = 0; i < n; i++) {
			array[i] = Integer.parseInt(str[i]);
		}
		return array;
	}
} Main
import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.nextLine());
		for (int i = 0; i < n; i++) {
			int[] line = convertInt(sc.nextLine().split(" "));
			sort(line);
			if ((line[2] * line[2]) == ((line[0] * line[0]) + (line[1] * line[1]))) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		}
	}

	public static void sort(int[] array) {
		int n = array.length;
		for (int i = 0; i < n; i++) {
			for (int j = 1; j < n; j++) {
				if (array[j] < array[j - 1]) {
					int box = array[j - 1];
					array[j - 1] = array[j];
					array[j] = box;
				}
			}
		}
	}

	public static int[] convertInt(String[] str) {
		int n = str.length;
		int[] array = new int[n];
		for (int i = 0; i < n; i++) {
			array[i] = Integer.parseInt(str[i]);
		}
		return array;
	}
}