import java.util.*;

class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int[] sides = new int[3];
		for (int i = 0; i < n; i++) {
			sides[0] = scanner.nextInt();
			sides[1] = scanner.nextInt();
			sides[2] = scanner.nextInt();
			Arrays.sort(sides);
			System.out.println(
				sides[0] * sides[0] + sides[1] * sides[1] == sides[2] * sides[2] ?
				"YES" : "NO"
				);
		}
	}
} import java.util.*; util.* java class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int[] sides = new int[3];
		for (int i = 0; i < n; i++) {
			sides[0] = scanner.nextInt();
			sides[1] = scanner.nextInt();
			sides[2] = scanner.nextInt();
			Arrays.sort(sides);
			System.out.println(
				sides[0] * sides[0] + sides[1] * sides[1] == sides[2] * sides[2] ?
				"YES" : "NO"
				);
		}
	}
} Main public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int[] sides = new int[3];
		for (int i = 0; i < n; i++) {
			sides[0] = scanner.nextInt();
			sides[1] = scanner.nextInt();
			sides[2] = scanner.nextInt();
			Arrays.sort(sides);
			System.out.println(
				sides[0] * sides[0] + sides[1] * sides[1] == sides[2] * sides[2] ?
				"YES" : "NO"
				);
		}
	} main {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int[] sides = new int[3];
		for (int i = 0; i < n; i++) {
			sides[0] = scanner.nextInt();
			sides[1] = scanner.nextInt();
			sides[2] = scanner.nextInt();
			Arrays.sort(sides);
			System.out.println(
				sides[0] * sides[0] + sides[1] * sides[1] == sides[2] * sides[2] ?
				"YES" : "NO"
				);
		}
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int n = scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner int[] sides = new int[3]; sides new int[3] 3 for (int i = 0; i < n; i++) {
			sides[0] = scanner.nextInt();
			sides[1] = scanner.nextInt();
			sides[2] = scanner.nextInt();
			Arrays.sort(sides);
			System.out.println(
				sides[0] * sides[0] + sides[1] * sides[1] == sides[2] * sides[2] ?
				"YES" : "NO"
				);
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			sides[0] = scanner.nextInt();
			sides[1] = scanner.nextInt();
			sides[2] = scanner.nextInt();
			Arrays.sort(sides);
			System.out.println(
				sides[0] * sides[0] + sides[1] * sides[1] == sides[2] * sides[2] ?
				"YES" : "NO"
				);
		} {
			sides[0] = scanner.nextInt();
			sides[1] = scanner.nextInt();
			sides[2] = scanner.nextInt();
			Arrays.sort(sides);
			System.out.println(
				sides[0] * sides[0] + sides[1] * sides[1] == sides[2] * sides[2] ?
				"YES" : "NO"
				);
		} sides[0] = scanner.nextInt() sides[0] sides 0 scanner.nextInt() scanner.nextInt scanner sides[1] = scanner.nextInt() sides[1] sides 1 scanner.nextInt() scanner.nextInt scanner sides[2] = scanner.nextInt() sides[2] sides 2 scanner.nextInt() scanner.nextInt scanner Arrays.sort(sides) Arrays.sort Arrays sides System.out.println(
				sides[0] * sides[0] + sides[1] * sides[1] == sides[2] * sides[2] ?
				"YES" : "NO"
				) System.out.println System.out System System.out sides[0] * sides[0] + sides[1] * sides[1] == sides[2] * sides[2] ?
				"YES" : "NO" sides[0] * sides[0] + sides[1] * sides[1] == sides[2] * sides[2] sides[0] * sides[0] + sides[1] * sides[1] sides[0] * sides[0] sides[0] sides 0 sides[0] sides 0 sides[1] * sides[1] sides[1] sides 1 sides[1] sides 1 sides[2] * sides[2] sides[2] sides 2 sides[2] sides 2 "YES" "NO" String[] args args
import java.util.*;

class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int[] sides = new int[3];
		for (int i = 0; i < n; i++) {
			sides[0] = scanner.nextInt();
			sides[1] = scanner.nextInt();
			sides[2] = scanner.nextInt();
			Arrays.sort(sides);
			System.out.println(
				sides[0] * sides[0] + sides[1] * sides[1] == sides[2] * sides[2] ?
				"YES" : "NO"
				);
		}
	}
}