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

public class Main {

	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {
		int n = sc.nextInt();

		int[][] box = new int[n][3];

		for (int i = 0; i < n; i++) {
			for (int j = 0; j < 3; j++) {
				box[i][j] = sc.nextInt();
			}
		}

		for (int i = 0; i < n; i++) {
			Arrays.sort(box[i]);
			int a = box[i][0];
			int b = box[i][1];
			int c = box[i][2];
			if (c * c == a * a + b * b) {
				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 {

	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {
		int n = sc.nextInt();

		int[][] box = new int[n][3];

		for (int i = 0; i < n; i++) {
			for (int j = 0; j < 3; j++) {
				box[i][j] = sc.nextInt();
			}
		}

		for (int i = 0; i < n; i++) {
			Arrays.sort(box[i]);
			int a = box[i][0];
			int b = box[i][1];
			int c = box[i][2];
			if (c * c == a * a + b * b) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}

		}

	}

} Main static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args) {
		int n = sc.nextInt();

		int[][] box = new int[n][3];

		for (int i = 0; i < n; i++) {
			for (int j = 0; j < 3; j++) {
				box[i][j] = sc.nextInt();
			}
		}

		for (int i = 0; i < n; i++) {
			Arrays.sort(box[i]);
			int a = box[i][0];
			int b = box[i][1];
			int c = box[i][2];
			if (c * c == a * a + b * b) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}

		}

	} main {
		int n = sc.nextInt();

		int[][] box = new int[n][3];

		for (int i = 0; i < n; i++) {
			for (int j = 0; j < 3; j++) {
				box[i][j] = sc.nextInt();
			}
		}

		for (int i = 0; i < n; i++) {
			Arrays.sort(box[i]);
			int a = box[i][0];
			int b = box[i][1];
			int c = box[i][2];
			if (c * c == a * a + b * b) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}

		}

	} int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int[][] box = new int[n][3]; box new int[n][3] n 3 for (int i = 0; i < n; i++) {
			for (int j = 0; j < 3; j++) {
				box[i][j] = sc.nextInt();
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			for (int j = 0; j < 3; j++) {
				box[i][j] = sc.nextInt();
			}
		} {
			for (int j = 0; j < 3; j++) {
				box[i][j] = sc.nextInt();
			}
		} for (int j = 0; j < 3; j++) {
				box[i][j] = sc.nextInt();
			} int j = 0; int j = 0; j 0 j < 3 j 3 j++ j++ j {
				box[i][j] = sc.nextInt();
			} {
				box[i][j] = sc.nextInt();
			} box[i][j] = sc.nextInt() box[i][j] box[i] box i j sc.nextInt() sc.nextInt sc for (int i = 0; i < n; i++) {
			Arrays.sort(box[i]);
			int a = box[i][0];
			int b = box[i][1];
			int c = box[i][2];
			if (c * c == a * a + b * b) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}

		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			Arrays.sort(box[i]);
			int a = box[i][0];
			int b = box[i][1];
			int c = box[i][2];
			if (c * c == a * a + b * b) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}

		} {
			Arrays.sort(box[i]);
			int a = box[i][0];
			int b = box[i][1];
			int c = box[i][2];
			if (c * c == a * a + b * b) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}

		} Arrays.sort(box[i]) Arrays.sort Arrays box[i] box i int a = box[i][0]; a box[i][0] box[i] box i 0 int b = box[i][1]; b box[i][1] box[i] box i 1 int c = box[i][2]; c box[i][2] box[i] box i 2 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 public class Main {

	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {
		int n = sc.nextInt();

		int[][] box = new int[n][3];

		for (int i = 0; i < n; i++) {
			for (int j = 0; j < 3; j++) {
				box[i][j] = sc.nextInt();
			}
		}

		for (int i = 0; i < n; i++) {
			Arrays.sort(box[i]);
			int a = box[i][0];
			int b = box[i][1];
			int c = box[i][2];
			if (c * c == a * a + b * b) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}

		}

	}

} public class Main {

	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {
		int n = sc.nextInt();

		int[][] box = new int[n][3];

		for (int i = 0; i < n; i++) {
			for (int j = 0; j < 3; j++) {
				box[i][j] = sc.nextInt();
			}
		}

		for (int i = 0; i < n; i++) {
			Arrays.sort(box[i]);
			int a = box[i][0];
			int b = box[i][1];
			int c = box[i][2];
			if (c * c == a * a + b * b) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}

		}

	}

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

public class Main {

	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {
		int n = sc.nextInt();

		int[][] box = new int[n][3];

		for (int i = 0; i < n; i++) {
			for (int j = 0; j < 3; j++) {
				box[i][j] = sc.nextInt();
			}
		}

		for (int i = 0; i < n; i++) {
			Arrays.sort(box[i]);
			int a = box[i][0];
			int b = box[i][1];
			int c = box[i][2];
			if (c * c == a * a + b * b) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}

		}

	}

}