import java.util.Arrays;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		@SuppressWarnings("resource")
		Scanner sc = new Scanner(System.in);
		// ???????????????????????°
		int num = sc.nextInt();

		for (int i = 0; i < num; i++) {
			int[] inputNumList = new int[3];

			inputNumList[0] = sc.nextInt();
			inputNumList[1] = sc.nextInt();
			inputNumList[2] = sc.nextInt();

			// ?????????????????????inputNumList[2]?????§?????????????????£?????????
			Arrays.sort(inputNumList);

			if (inputNumList[0] * inputNumList[0] + inputNumList[1]
					* inputNumList[1] == inputNumList[2] * inputNumList[2]) {
				System.out.println("YES");

			} else {
				System.out.println("NO");
			}
		}

	}

} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		@SuppressWarnings("resource")
		Scanner sc = new Scanner(System.in);
		// ???????????????????????°
		int num = sc.nextInt();

		for (int i = 0; i < num; i++) {
			int[] inputNumList = new int[3];

			inputNumList[0] = sc.nextInt();
			inputNumList[1] = sc.nextInt();
			inputNumList[2] = sc.nextInt();

			// ?????????????????????inputNumList[2]?????§?????????????????£?????????
			Arrays.sort(inputNumList);

			if (inputNumList[0] * inputNumList[0] + inputNumList[1]
					* inputNumList[1] == inputNumList[2] * inputNumList[2]) {
				System.out.println("YES");

			} else {
				System.out.println("NO");
			}
		}

	}

} Main public static void main(String[] args) {
		@SuppressWarnings("resource")
		Scanner sc = new Scanner(System.in);
		// ???????????????????????°
		int num = sc.nextInt();

		for (int i = 0; i < num; i++) {
			int[] inputNumList = new int[3];

			inputNumList[0] = sc.nextInt();
			inputNumList[1] = sc.nextInt();
			inputNumList[2] = sc.nextInt();

			// ?????????????????????inputNumList[2]?????§?????????????????£?????????
			Arrays.sort(inputNumList);

			if (inputNumList[0] * inputNumList[0] + inputNumList[1]
					* inputNumList[1] == inputNumList[2] * inputNumList[2]) {
				System.out.println("YES");

			} else {
				System.out.println("NO");
			}
		}

	} main {
		@SuppressWarnings("resource")
		Scanner sc = new Scanner(System.in);
		// ???????????????????????°
		int num = sc.nextInt();

		for (int i = 0; i < num; i++) {
			int[] inputNumList = new int[3];

			inputNumList[0] = sc.nextInt();
			inputNumList[1] = sc.nextInt();
			inputNumList[2] = sc.nextInt();

			// ?????????????????????inputNumList[2]?????§?????????????????£?????????
			Arrays.sort(inputNumList);

			if (inputNumList[0] * inputNumList[0] + inputNumList[1]
					* inputNumList[1] == inputNumList[2] * inputNumList[2]) {
				System.out.println("YES");

			} else {
				System.out.println("NO");
			}
		}

	} @SuppressWarnings("resource")
		Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int num = sc.nextInt(); num sc.nextInt() sc.nextInt sc for (int i = 0; i < num; i++) {
			int[] inputNumList = new int[3];

			inputNumList[0] = sc.nextInt();
			inputNumList[1] = sc.nextInt();
			inputNumList[2] = sc.nextInt();

			// ?????????????????????inputNumList[2]?????§?????????????????£?????????
			Arrays.sort(inputNumList);

			if (inputNumList[0] * inputNumList[0] + inputNumList[1]
					* inputNumList[1] == inputNumList[2] * inputNumList[2]) {
				System.out.println("YES");

			} else {
				System.out.println("NO");
			}
		} int i = 0; int i = 0; i 0 i < num i num i++ i++ i {
			int[] inputNumList = new int[3];

			inputNumList[0] = sc.nextInt();
			inputNumList[1] = sc.nextInt();
			inputNumList[2] = sc.nextInt();

			// ?????????????????????inputNumList[2]?????§?????????????????£?????????
			Arrays.sort(inputNumList);

			if (inputNumList[0] * inputNumList[0] + inputNumList[1]
					* inputNumList[1] == inputNumList[2] * inputNumList[2]) {
				System.out.println("YES");

			} else {
				System.out.println("NO");
			}
		} {
			int[] inputNumList = new int[3];

			inputNumList[0] = sc.nextInt();
			inputNumList[1] = sc.nextInt();
			inputNumList[2] = sc.nextInt();

			// ?????????????????????inputNumList[2]?????§?????????????????£?????????
			Arrays.sort(inputNumList);

			if (inputNumList[0] * inputNumList[0] + inputNumList[1]
					* inputNumList[1] == inputNumList[2] * inputNumList[2]) {
				System.out.println("YES");

			} else {
				System.out.println("NO");
			}
		} int[] inputNumList = new int[3]; inputNumList new int[3] 3 inputNumList[0] = sc.nextInt() inputNumList[0] inputNumList 0 sc.nextInt() sc.nextInt sc inputNumList[1] = sc.nextInt() inputNumList[1] inputNumList 1 sc.nextInt() sc.nextInt sc inputNumList[2] = sc.nextInt() inputNumList[2] inputNumList 2 sc.nextInt() sc.nextInt sc Arrays.sort(inputNumList) Arrays.sort Arrays inputNumList if (inputNumList[0] * inputNumList[0] + inputNumList[1]
					* inputNumList[1] == inputNumList[2] * inputNumList[2]) {
				System.out.println("YES");

			} else {
				System.out.println("NO");
			} inputNumList[0] * inputNumList[0] + inputNumList[1]
					* inputNumList[1] == inputNumList[2] * inputNumList[2] inputNumList[0] * inputNumList[0] + inputNumList[1]
					* inputNumList[1] inputNumList[0] * inputNumList[0] inputNumList[0] inputNumList 0 inputNumList[0] inputNumList 0 inputNumList[1]
					* inputNumList[1] inputNumList[1] inputNumList 1 inputNumList[1] inputNumList 1 inputNumList[2] * inputNumList[2] inputNumList[2] inputNumList 2 inputNumList[2] inputNumList 2 {
				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 class Main {

	public static void main(String[] args) {
		@SuppressWarnings("resource")
		Scanner sc = new Scanner(System.in);
		// ???????????????????????°
		int num = sc.nextInt();

		for (int i = 0; i < num; i++) {
			int[] inputNumList = new int[3];

			inputNumList[0] = sc.nextInt();
			inputNumList[1] = sc.nextInt();
			inputNumList[2] = sc.nextInt();

			// ?????????????????????inputNumList[2]?????§?????????????????£?????????
			Arrays.sort(inputNumList);

			if (inputNumList[0] * inputNumList[0] + inputNumList[1]
					* inputNumList[1] == inputNumList[2] * inputNumList[2]) {
				System.out.println("YES");

			} else {
				System.out.println("NO");
			}
		}

	}

} public class Main {

	public static void main(String[] args) {
		@SuppressWarnings("resource")
		Scanner sc = new Scanner(System.in);
		// ???????????????????????°
		int num = sc.nextInt();

		for (int i = 0; i < num; i++) {
			int[] inputNumList = new int[3];

			inputNumList[0] = sc.nextInt();
			inputNumList[1] = sc.nextInt();
			inputNumList[2] = sc.nextInt();

			// ?????????????????????inputNumList[2]?????§?????????????????£?????????
			Arrays.sort(inputNumList);

			if (inputNumList[0] * inputNumList[0] + inputNumList[1]
					* inputNumList[1] == inputNumList[2] * inputNumList[2]) {
				System.out.println("YES");

			} else {
				System.out.println("NO");
			}
		}

	}

} Main
import java.util.Arrays;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		@SuppressWarnings("resource")
		Scanner sc = new Scanner(System.in);
		// ???????????????????????°
		int num = sc.nextInt();

		for (int i = 0; i < num; i++) {
			int[] inputNumList = new int[3];

			inputNumList[0] = sc.nextInt();
			inputNumList[1] = sc.nextInt();
			inputNumList[2] = sc.nextInt();

			// ?????????????????????inputNumList[2]?????§?????????????????£?????????
			Arrays.sort(inputNumList);

			if (inputNumList[0] * inputNumList[0] + inputNumList[1]
					* inputNumList[1] == inputNumList[2] * inputNumList[2]) {
				System.out.println("YES");

			} else {
				System.out.println("NO");
			}
		}

	}

}