import java.util.Scanner;

public class Main {
	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {

		int num = sc.nextInt();

		while(num-- != 0) {
			int[] side =  new int[3];
			for(int count = 0; count < 3; count++) {
				side[count] = (int)Math.pow(sc.nextInt(), 2);
			}

			if(side[0] == side[1] + side[2] || side[1] == side[0] + side[2] || side[2] == side[0] + side[1]) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		}

	}

} import java.util.Scanner; Scanner java.util public class Main {
	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {

		int num = sc.nextInt();

		while(num-- != 0) {
			int[] side =  new int[3];
			for(int count = 0; count < 3; count++) {
				side[count] = (int)Math.pow(sc.nextInt(), 2);
			}

			if(side[0] == side[1] + side[2] || side[1] == side[0] + side[2] || side[2] == side[0] + side[1]) {
				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 num = sc.nextInt();

		while(num-- != 0) {
			int[] side =  new int[3];
			for(int count = 0; count < 3; count++) {
				side[count] = (int)Math.pow(sc.nextInt(), 2);
			}

			if(side[0] == side[1] + side[2] || side[1] == side[0] + side[2] || side[2] == side[0] + side[1]) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		}

	} main {

		int num = sc.nextInt();

		while(num-- != 0) {
			int[] side =  new int[3];
			for(int count = 0; count < 3; count++) {
				side[count] = (int)Math.pow(sc.nextInt(), 2);
			}

			if(side[0] == side[1] + side[2] || side[1] == side[0] + side[2] || side[2] == side[0] + side[1]) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		}

	} int num = sc.nextInt(); num sc.nextInt() sc.nextInt sc while(num-- != 0) {
			int[] side =  new int[3];
			for(int count = 0; count < 3; count++) {
				side[count] = (int)Math.pow(sc.nextInt(), 2);
			}

			if(side[0] == side[1] + side[2] || side[1] == side[0] + side[2] || side[2] == side[0] + side[1]) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		} num-- != 0 num-- num 0 {
			int[] side =  new int[3];
			for(int count = 0; count < 3; count++) {
				side[count] = (int)Math.pow(sc.nextInt(), 2);
			}

			if(side[0] == side[1] + side[2] || side[1] == side[0] + side[2] || side[2] == side[0] + side[1]) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		} int[] side =  new int[3]; side new int[3] 3 for(int count = 0; count < 3; count++) {
				side[count] = (int)Math.pow(sc.nextInt(), 2);
			} int count = 0; int count = 0; count 0 count < 3 count 3 count++ count++ count {
				side[count] = (int)Math.pow(sc.nextInt(), 2);
			} {
				side[count] = (int)Math.pow(sc.nextInt(), 2);
			} side[count] = (int)Math.pow(sc.nextInt(), 2) side[count] side count (int)Math.pow(sc.nextInt(), 2) Math.pow Math sc.nextInt() sc.nextInt sc 2 if(side[0] == side[1] + side[2] || side[1] == side[0] + side[2] || side[2] == side[0] + side[1]) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			} side[0] == side[1] + side[2] || side[1] == side[0] + side[2] || side[2] == side[0] + side[1] side[0] == side[1] + side[2] || side[1] == side[0] + side[2] || side[2] == side[0] + side[1] side[0] == side[1] + side[2] side[0] side 0 side[1] + side[2] side[1] side 1 side[2] side 2 side[1] == side[0] + side[2] side[1] side 1 side[0] + side[2] side[0] side 0 side[2] side 2 side[2] == side[0] + side[1] side[2] side 2 side[0] + side[1] side[0] side 0 side[1] side 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 class Main {
	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {

		int num = sc.nextInt();

		while(num-- != 0) {
			int[] side =  new int[3];
			for(int count = 0; count < 3; count++) {
				side[count] = (int)Math.pow(sc.nextInt(), 2);
			}

			if(side[0] == side[1] + side[2] || side[1] == side[0] + side[2] || side[2] == side[0] + side[1]) {
				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 num = sc.nextInt();

		while(num-- != 0) {
			int[] side =  new int[3];
			for(int count = 0; count < 3; count++) {
				side[count] = (int)Math.pow(sc.nextInt(), 2);
			}

			if(side[0] == side[1] + side[2] || side[1] == side[0] + side[2] || side[2] == side[0] + side[1]) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		}

	}

} Main
import java.util.Scanner;

public class Main {
	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {

		int num = sc.nextInt();

		while(num-- != 0) {
			int[] side =  new int[3];
			for(int count = 0; count < 3; count++) {
				side[count] = (int)Math.pow(sc.nextInt(), 2);
			}

			if(side[0] == side[1] + side[2] || side[1] == side[0] + side[2] || side[2] == side[0] + side[1]) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		}

	}

}