import java.util.Scanner;
public class Main {
	public static void main(String[] args) throws java.io.IOException {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[] a = new int [n];
		int[] b = new int [n];
		int[] c = new int [n];
		for(int d = 0; d < n ; d++){
			a[d] = scan.nextInt();
			b[d] = scan.nextInt();
			c[d] = scan.nextInt();
		}
		for(int e = 0;e < n ; e++){
			if((a[e]*a[e]+b[e]*b[e]==c[e]*c[e]) || (b[e]*b[e]+c[e]*c[e]==a[e]*a[e]) || (c[e]*c[e]+a[e]*a[e]==b[e]*b[e])){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) throws java.io.IOException {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[] a = new int [n];
		int[] b = new int [n];
		int[] c = new int [n];
		for(int d = 0; d < n ; d++){
			a[d] = scan.nextInt();
			b[d] = scan.nextInt();
			c[d] = scan.nextInt();
		}
		for(int e = 0;e < n ; e++){
			if((a[e]*a[e]+b[e]*b[e]==c[e]*c[e]) || (b[e]*b[e]+c[e]*c[e]==a[e]*a[e]) || (c[e]*c[e]+a[e]*a[e]==b[e]*b[e])){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		}
	}
} Main public static void main(String[] args) throws java.io.IOException {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[] a = new int [n];
		int[] b = new int [n];
		int[] c = new int [n];
		for(int d = 0; d < n ; d++){
			a[d] = scan.nextInt();
			b[d] = scan.nextInt();
			c[d] = scan.nextInt();
		}
		for(int e = 0;e < n ; e++){
			if((a[e]*a[e]+b[e]*b[e]==c[e]*c[e]) || (b[e]*b[e]+c[e]*c[e]==a[e]*a[e]) || (c[e]*c[e]+a[e]*a[e]==b[e]*b[e])){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		}
	} main {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[] a = new int [n];
		int[] b = new int [n];
		int[] c = new int [n];
		for(int d = 0; d < n ; d++){
			a[d] = scan.nextInt();
			b[d] = scan.nextInt();
			c[d] = scan.nextInt();
		}
		for(int e = 0;e < n ; e++){
			if((a[e]*a[e]+b[e]*b[e]==c[e]*c[e]) || (b[e]*b[e]+c[e]*c[e]==a[e]*a[e]) || (c[e]*c[e]+a[e]*a[e]==b[e]*b[e])){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int[] a = new int [n]; a new int [n] n int[] b = new int [n]; b new int [n] n int[] c = new int [n]; c new int [n] n for(int d = 0; d < n ; d++){
			a[d] = scan.nextInt();
			b[d] = scan.nextInt();
			c[d] = scan.nextInt();
		} int d = 0; int d = 0; d 0 d < n d n d++ d++ d {
			a[d] = scan.nextInt();
			b[d] = scan.nextInt();
			c[d] = scan.nextInt();
		} {
			a[d] = scan.nextInt();
			b[d] = scan.nextInt();
			c[d] = scan.nextInt();
		} a[d] = scan.nextInt() a[d] a d scan.nextInt() scan.nextInt scan b[d] = scan.nextInt() b[d] b d scan.nextInt() scan.nextInt scan c[d] = scan.nextInt() c[d] c d scan.nextInt() scan.nextInt scan for(int e = 0;e < n ; e++){
			if((a[e]*a[e]+b[e]*b[e]==c[e]*c[e]) || (b[e]*b[e]+c[e]*c[e]==a[e]*a[e]) || (c[e]*c[e]+a[e]*a[e]==b[e]*b[e])){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		} int e = 0; int e = 0; e 0 e < n e n e++ e++ e {
			if((a[e]*a[e]+b[e]*b[e]==c[e]*c[e]) || (b[e]*b[e]+c[e]*c[e]==a[e]*a[e]) || (c[e]*c[e]+a[e]*a[e]==b[e]*b[e])){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		} {
			if((a[e]*a[e]+b[e]*b[e]==c[e]*c[e]) || (b[e]*b[e]+c[e]*c[e]==a[e]*a[e]) || (c[e]*c[e]+a[e]*a[e]==b[e]*b[e])){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		} if((a[e]*a[e]+b[e]*b[e]==c[e]*c[e]) || (b[e]*b[e]+c[e]*c[e]==a[e]*a[e]) || (c[e]*c[e]+a[e]*a[e]==b[e]*b[e])){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			} (a[e]*a[e]+b[e]*b[e]==c[e]*c[e]) || (b[e]*b[e]+c[e]*c[e]==a[e]*a[e]) || (c[e]*c[e]+a[e]*a[e]==b[e]*b[e]) (a[e]*a[e]+b[e]*b[e]==c[e]*c[e]) || (b[e]*b[e]+c[e]*c[e]==a[e]*a[e]) || (c[e]*c[e]+a[e]*a[e]==b[e]*b[e]) (a[e]*a[e]+b[e]*b[e]==c[e]*c[e]) a[e]*a[e]+b[e]*b[e] a[e]*a[e] a[e] a e a[e] a e b[e]*b[e] b[e] b e b[e] b e c[e]*c[e] c[e] c e c[e] c e (b[e]*b[e]+c[e]*c[e]==a[e]*a[e]) b[e]*b[e]+c[e]*c[e] b[e]*b[e] b[e] b e b[e] b e c[e]*c[e] c[e] c e c[e] c e a[e]*a[e] a[e] a e a[e] a e (c[e]*c[e]+a[e]*a[e]==b[e]*b[e]) c[e]*c[e]+a[e]*a[e] c[e]*c[e] c[e] c e c[e] c e a[e]*a[e] a[e] a e a[e] a e b[e]*b[e] b[e] b e b[e] b e {
				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 {
	public static void main(String[] args) throws java.io.IOException {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[] a = new int [n];
		int[] b = new int [n];
		int[] c = new int [n];
		for(int d = 0; d < n ; d++){
			a[d] = scan.nextInt();
			b[d] = scan.nextInt();
			c[d] = scan.nextInt();
		}
		for(int e = 0;e < n ; e++){
			if((a[e]*a[e]+b[e]*b[e]==c[e]*c[e]) || (b[e]*b[e]+c[e]*c[e]==a[e]*a[e]) || (c[e]*c[e]+a[e]*a[e]==b[e]*b[e])){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		}
	}
} public class Main {
	public static void main(String[] args) throws java.io.IOException {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[] a = new int [n];
		int[] b = new int [n];
		int[] c = new int [n];
		for(int d = 0; d < n ; d++){
			a[d] = scan.nextInt();
			b[d] = scan.nextInt();
			c[d] = scan.nextInt();
		}
		for(int e = 0;e < n ; e++){
			if((a[e]*a[e]+b[e]*b[e]==c[e]*c[e]) || (b[e]*b[e]+c[e]*c[e]==a[e]*a[e]) || (c[e]*c[e]+a[e]*a[e]==b[e]*b[e])){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		}
	}
} Main
import java.util.Scanner;
public class Main {
	public static void main(String[] args) throws java.io.IOException {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[] a = new int [n];
		int[] b = new int [n];
		int[] c = new int [n];
		for(int d = 0; d < n ; d++){
			a[d] = scan.nextInt();
			b[d] = scan.nextInt();
			c[d] = scan.nextInt();
		}
		for(int e = 0;e < n ; e++){
			if((a[e]*a[e]+b[e]*b[e]==c[e]*c[e]) || (b[e]*b[e]+c[e]*c[e]==a[e]*a[e]) || (c[e]*c[e]+a[e]*a[e]==b[e]*b[e])){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		}
	}
}