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

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		for(int i=0;i<n;i++) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			int c = sc.nextInt();
			System.out.println(isRightTriangle(a, b, c) ? "YES" : "NO");
		}
	}
	
	public static boolean isRightTriangle(int a,int b,int c) {
		int[] x = new int[3];
		x[0] = a; x[1] = b; x[2] = c;
		Arrays.sort(x);
		return x[0] * x[0] + x[1] * x[1] == x[2] * x[2];
	}

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

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		for(int i=0;i<n;i++) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			int c = sc.nextInt();
			System.out.println(isRightTriangle(a, b, c) ? "YES" : "NO");
		}
	}
	
	public static boolean isRightTriangle(int a,int b,int c) {
		int[] x = new int[3];
		x[0] = a; x[1] = b; x[2] = c;
		Arrays.sort(x);
		return x[0] * x[0] + x[1] * x[1] == x[2] * x[2];
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		for(int i=0;i<n;i++) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			int c = sc.nextInt();
			System.out.println(isRightTriangle(a, b, c) ? "YES" : "NO");
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		for(int i=0;i<n;i++) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			int c = sc.nextInt();
			System.out.println(isRightTriangle(a, b, c) ? "YES" : "NO");
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc for(int i=0;i<n;i++) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			int c = sc.nextInt();
			System.out.println(isRightTriangle(a, b, c) ? "YES" : "NO");
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			int a = sc.nextInt();
			int b = sc.nextInt();
			int c = sc.nextInt();
			System.out.println(isRightTriangle(a, b, c) ? "YES" : "NO");
		} {
			int a = sc.nextInt();
			int b = sc.nextInt();
			int c = sc.nextInt();
			System.out.println(isRightTriangle(a, b, c) ? "YES" : "NO");
		} int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc int c = sc.nextInt(); c sc.nextInt() sc.nextInt sc System.out.println(isRightTriangle(a, b, c) ? "YES" : "NO") System.out.println System.out System System.out isRightTriangle(a, b, c) ? "YES" : "NO" isRightTriangle(a, b, c) isRightTriangle a b c "YES" "NO" String[] args args public static boolean isRightTriangle(int a,int b,int c) {
		int[] x = new int[3];
		x[0] = a; x[1] = b; x[2] = c;
		Arrays.sort(x);
		return x[0] * x[0] + x[1] * x[1] == x[2] * x[2];
	} isRightTriangle {
		int[] x = new int[3];
		x[0] = a; x[1] = b; x[2] = c;
		Arrays.sort(x);
		return x[0] * x[0] + x[1] * x[1] == x[2] * x[2];
	} int[] x = new int[3]; x new int[3] 3 x[0] = a x[0] x 0 a x[1] = b x[1] x 1 b x[2] = c x[2] x 2 c Arrays.sort(x) Arrays.sort Arrays x return x[0] * x[0] + x[1] * x[1] == x[2] * x[2]; x[0] * x[0] + x[1] * x[1] == x[2] * x[2] x[0] * x[0] + x[1] * x[1] x[0] * x[0] x[0] x 0 x[0] x 0 x[1] * x[1] x[1] x 1 x[1] x 1 x[2] * x[2] x[2] x 2 x[2] x 2 int a a int b b int c c public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		for(int i=0;i<n;i++) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			int c = sc.nextInt();
			System.out.println(isRightTriangle(a, b, c) ? "YES" : "NO");
		}
	}
	
	public static boolean isRightTriangle(int a,int b,int c) {
		int[] x = new int[3];
		x[0] = a; x[1] = b; x[2] = c;
		Arrays.sort(x);
		return x[0] * x[0] + x[1] * x[1] == x[2] * x[2];
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		for(int i=0;i<n;i++) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			int c = sc.nextInt();
			System.out.println(isRightTriangle(a, b, c) ? "YES" : "NO");
		}
	}
	
	public static boolean isRightTriangle(int a,int b,int c) {
		int[] x = new int[3];
		x[0] = a; x[1] = b; x[2] = c;
		Arrays.sort(x);
		return x[0] * x[0] + x[1] * x[1] == x[2] * x[2];
	}

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

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		for(int i=0;i<n;i++) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			int c = sc.nextInt();
			System.out.println(isRightTriangle(a, b, c) ? "YES" : "NO");
		}
	}
	
	public static boolean isRightTriangle(int a,int b,int c) {
		int[] x = new int[3];
		x[0] = a; x[1] = b; x[2] = c;
		Arrays.sort(x);
		return x[0] * x[0] + x[1] * x[1] == x[2] * x[2];
	}

}