

import java.util.Scanner;

public class Main {

	void run() {

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();

		int a, b, c;

		for (int i = 0; i < N; i++) {
			a = sc.nextInt();
			b = sc.nextInt();
			c = sc.nextInt();

			a = a * a;
			b = b * b;
			c = c * c;

			if (a + b == c) {
				System.out.println("YES");
			} else if (b + c == a) {
				System.out.println("YES");
			} else if (a + c == b) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		}

	}

	public static void main(String[] args) {
		new Main().run();
	}
} import java.util.Scanner; Scanner java.util public class Main {

	void run() {

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();

		int a, b, c;

		for (int i = 0; i < N; i++) {
			a = sc.nextInt();
			b = sc.nextInt();
			c = sc.nextInt();

			a = a * a;
			b = b * b;
			c = c * c;

			if (a + b == c) {
				System.out.println("YES");
			} else if (b + c == a) {
				System.out.println("YES");
			} else if (a + c == b) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		}

	}

	public static void main(String[] args) {
		new Main().run();
	}
} Main void run() {

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();

		int a, b, c;

		for (int i = 0; i < N; i++) {
			a = sc.nextInt();
			b = sc.nextInt();
			c = sc.nextInt();

			a = a * a;
			b = b * b;
			c = c * c;

			if (a + b == c) {
				System.out.println("YES");
			} else if (b + c == a) {
				System.out.println("YES");
			} else if (a + c == b) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		}

	} run {

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();

		int a, b, c;

		for (int i = 0; i < N; i++) {
			a = sc.nextInt();
			b = sc.nextInt();
			c = sc.nextInt();

			a = a * a;
			b = b * b;
			c = c * c;

			if (a + b == c) {
				System.out.println("YES");
			} else if (b + c == a) {
				System.out.println("YES");
			} else if (a + c == b) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		}

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int a a b b c; c for (int i = 0; i < N; i++) {
			a = sc.nextInt();
			b = sc.nextInt();
			c = sc.nextInt();

			a = a * a;
			b = b * b;
			c = c * c;

			if (a + b == c) {
				System.out.println("YES");
			} else if (b + c == a) {
				System.out.println("YES");
			} else if (a + c == 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 {
			a = sc.nextInt();
			b = sc.nextInt();
			c = sc.nextInt();

			a = a * a;
			b = b * b;
			c = c * c;

			if (a + b == c) {
				System.out.println("YES");
			} else if (b + c == a) {
				System.out.println("YES");
			} else if (a + c == b) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		} {
			a = sc.nextInt();
			b = sc.nextInt();
			c = sc.nextInt();

			a = a * a;
			b = b * b;
			c = c * c;

			if (a + b == c) {
				System.out.println("YES");
			} else if (b + c == a) {
				System.out.println("YES");
			} else if (a + c == b) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		} a = sc.nextInt() a sc.nextInt() sc.nextInt sc b = sc.nextInt() b sc.nextInt() sc.nextInt sc c = sc.nextInt() c sc.nextInt() sc.nextInt sc a = a * a a a * a a a b = b * b b b * b b b c = c * c c c * c c c if (a + b == c) {
				System.out.println("YES");
			} else if (b + c == a) {
				System.out.println("YES");
			} else if (a + c == b) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			} a + b == c a + b a b c {
				System.out.println("YES");
			} System.out.println("YES") System.out.println System.out System System.out "YES" if (b + c == a) {
				System.out.println("YES");
			} else if (a + c == b) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			} b + c == a b + c b c a {
				System.out.println("YES");
			} System.out.println("YES") System.out.println System.out System System.out "YES" if (a + c == b) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			} a + c == b a + c a c 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" public static void main(String[] args) {
		new Main().run();
	} main {
		new Main().run();
	} new Main().run() new Main().run new Main() String[] args args public class Main {

	void run() {

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();

		int a, b, c;

		for (int i = 0; i < N; i++) {
			a = sc.nextInt();
			b = sc.nextInt();
			c = sc.nextInt();

			a = a * a;
			b = b * b;
			c = c * c;

			if (a + b == c) {
				System.out.println("YES");
			} else if (b + c == a) {
				System.out.println("YES");
			} else if (a + c == b) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		}

	}

	public static void main(String[] args) {
		new Main().run();
	}
} public class Main {

	void run() {

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();

		int a, b, c;

		for (int i = 0; i < N; i++) {
			a = sc.nextInt();
			b = sc.nextInt();
			c = sc.nextInt();

			a = a * a;
			b = b * b;
			c = c * c;

			if (a + b == c) {
				System.out.println("YES");
			} else if (b + c == a) {
				System.out.println("YES");
			} else if (a + c == b) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		}

	}

	public static void main(String[] args) {
		new Main().run();
	}
} Main


import java.util.Scanner;

public class Main {

	void run() {

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();

		int a, b, c;

		for (int i = 0; i < N; i++) {
			a = sc.nextInt();
			b = sc.nextInt();
			c = sc.nextInt();

			a = a * a;
			b = b * b;
			c = c * c;

			if (a + b == c) {
				System.out.println("YES");
			} else if (b + c == a) {
				System.out.println("YES");
			} else if (a + c == b) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		}

	}

	public static void main(String[] args) {
		new Main().run();
	}
}