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

public class Main {
	public static void main(String[] arg) {
		int[] a=new int[3];
		int n=0;
		Scanner scan = new Scanner(System.in);
		n=scan.nextInt();
		for (int j=0;j<n;j++) {
			a[0] = scan.nextInt();
			a[1] = scan.nextInt();
			a[2] = scan.nextInt();
			Arrays.sort(a);
			if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2]){
				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 {
	public static void main(String[] arg) {
		int[] a=new int[3];
		int n=0;
		Scanner scan = new Scanner(System.in);
		n=scan.nextInt();
		for (int j=0;j<n;j++) {
			a[0] = scan.nextInt();
			a[1] = scan.nextInt();
			a[2] = scan.nextInt();
			Arrays.sort(a);
			if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2]){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		}
	}
} Main public static void main(String[] arg) {
		int[] a=new int[3];
		int n=0;
		Scanner scan = new Scanner(System.in);
		n=scan.nextInt();
		for (int j=0;j<n;j++) {
			a[0] = scan.nextInt();
			a[1] = scan.nextInt();
			a[2] = scan.nextInt();
			Arrays.sort(a);
			if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2]){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		}
	} main {
		int[] a=new int[3];
		int n=0;
		Scanner scan = new Scanner(System.in);
		n=scan.nextInt();
		for (int j=0;j<n;j++) {
			a[0] = scan.nextInt();
			a[1] = scan.nextInt();
			a[2] = scan.nextInt();
			Arrays.sort(a);
			if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2]){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		}
	} int[] a=new int[3]; a new int[3] 3 int n=0; n 0 Scanner scan = new Scanner(System.in); scan new Scanner(System.in) n=scan.nextInt() n scan.nextInt() scan.nextInt scan for (int j=0;j<n;j++) {
			a[0] = scan.nextInt();
			a[1] = scan.nextInt();
			a[2] = scan.nextInt();
			Arrays.sort(a);
			if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2]){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		} int j=0; int j=0; j 0 j<n j n j++ j++ j {
			a[0] = scan.nextInt();
			a[1] = scan.nextInt();
			a[2] = scan.nextInt();
			Arrays.sort(a);
			if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2]){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		} {
			a[0] = scan.nextInt();
			a[1] = scan.nextInt();
			a[2] = scan.nextInt();
			Arrays.sort(a);
			if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2]){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		} a[0] = scan.nextInt() a[0] a 0 scan.nextInt() scan.nextInt scan a[1] = scan.nextInt() a[1] a 1 scan.nextInt() scan.nextInt scan a[2] = scan.nextInt() a[2] a 2 scan.nextInt() scan.nextInt scan Arrays.sort(a) Arrays.sort Arrays a if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2]){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			} a[0]*a[0]+a[1]*a[1]==a[2]*a[2] a[0]*a[0]+a[1]*a[1] a[0]*a[0] a[0] a 0 a[0] a 0 a[1]*a[1] a[1] a 1 a[1] a 1 a[2]*a[2] a[2] a 2 a[2] a 2 {
				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[] arg arg public class Main {
	public static void main(String[] arg) {
		int[] a=new int[3];
		int n=0;
		Scanner scan = new Scanner(System.in);
		n=scan.nextInt();
		for (int j=0;j<n;j++) {
			a[0] = scan.nextInt();
			a[1] = scan.nextInt();
			a[2] = scan.nextInt();
			Arrays.sort(a);
			if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2]){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		}
	}
} public class Main {
	public static void main(String[] arg) {
		int[] a=new int[3];
		int n=0;
		Scanner scan = new Scanner(System.in);
		n=scan.nextInt();
		for (int j=0;j<n;j++) {
			a[0] = scan.nextInt();
			a[1] = scan.nextInt();
			a[2] = scan.nextInt();
			Arrays.sort(a);
			if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2]){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		}
	}
} Main
import java.util.Arrays;
import java.util.Scanner;

public class Main {
	public static void main(String[] arg) {
		int[] a=new int[3];
		int n=0;
		Scanner scan = new Scanner(System.in);
		n=scan.nextInt();
		for (int j=0;j<n;j++) {
			a[0] = scan.nextInt();
			a[1] = scan.nextInt();
			a[2] = scan.nextInt();
			Arrays.sort(a);
			if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2]){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		}
	}
}