
import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner stdIn = new Scanner(System.in);
		int n = stdIn.nextInt();
		for(int i=0;i<n;i++){
			int a = stdIn.nextInt();
			int b = stdIn.nextInt();
			int c = stdIn.nextInt();
			
			if(a<b){
				if(b<c){
					func(c,a,b);
				}
				else{
					func(b,a,c);
				}
			}
			else{
				if(a<c){
					func(c,a,b);
				}
				else{
					func(a,b,c);
				}
			}
		}
	}
	
	static void func(int a,int b,int c){
		if(Math.pow(a,2) == (Math.pow(b,2)+Math.pow(c,2))){
			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){
		Scanner stdIn = new Scanner(System.in);
		int n = stdIn.nextInt();
		for(int i=0;i<n;i++){
			int a = stdIn.nextInt();
			int b = stdIn.nextInt();
			int c = stdIn.nextInt();
			
			if(a<b){
				if(b<c){
					func(c,a,b);
				}
				else{
					func(b,a,c);
				}
			}
			else{
				if(a<c){
					func(c,a,b);
				}
				else{
					func(a,b,c);
				}
			}
		}
	}
	
	static void func(int a,int b,int c){
		if(Math.pow(a,2) == (Math.pow(b,2)+Math.pow(c,2))){
			System.out.println("YES");
		}
		else{
			System.out.println("NO");
		}
	}
} Main public static void main(String[] args){
		Scanner stdIn = new Scanner(System.in);
		int n = stdIn.nextInt();
		for(int i=0;i<n;i++){
			int a = stdIn.nextInt();
			int b = stdIn.nextInt();
			int c = stdIn.nextInt();
			
			if(a<b){
				if(b<c){
					func(c,a,b);
				}
				else{
					func(b,a,c);
				}
			}
			else{
				if(a<c){
					func(c,a,b);
				}
				else{
					func(a,b,c);
				}
			}
		}
	} main {
		Scanner stdIn = new Scanner(System.in);
		int n = stdIn.nextInt();
		for(int i=0;i<n;i++){
			int a = stdIn.nextInt();
			int b = stdIn.nextInt();
			int c = stdIn.nextInt();
			
			if(a<b){
				if(b<c){
					func(c,a,b);
				}
				else{
					func(b,a,c);
				}
			}
			else{
				if(a<c){
					func(c,a,b);
				}
				else{
					func(a,b,c);
				}
			}
		}
	} Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) int n = stdIn.nextInt(); n stdIn.nextInt() stdIn.nextInt stdIn for(int i=0;i<n;i++){
			int a = stdIn.nextInt();
			int b = stdIn.nextInt();
			int c = stdIn.nextInt();
			
			if(a<b){
				if(b<c){
					func(c,a,b);
				}
				else{
					func(b,a,c);
				}
			}
			else{
				if(a<c){
					func(c,a,b);
				}
				else{
					func(a,b,c);
				}
			}
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			int a = stdIn.nextInt();
			int b = stdIn.nextInt();
			int c = stdIn.nextInt();
			
			if(a<b){
				if(b<c){
					func(c,a,b);
				}
				else{
					func(b,a,c);
				}
			}
			else{
				if(a<c){
					func(c,a,b);
				}
				else{
					func(a,b,c);
				}
			}
		} {
			int a = stdIn.nextInt();
			int b = stdIn.nextInt();
			int c = stdIn.nextInt();
			
			if(a<b){
				if(b<c){
					func(c,a,b);
				}
				else{
					func(b,a,c);
				}
			}
			else{
				if(a<c){
					func(c,a,b);
				}
				else{
					func(a,b,c);
				}
			}
		} int a = stdIn.nextInt(); a stdIn.nextInt() stdIn.nextInt stdIn int b = stdIn.nextInt(); b stdIn.nextInt() stdIn.nextInt stdIn int c = stdIn.nextInt(); c stdIn.nextInt() stdIn.nextInt stdIn if(a<b){
				if(b<c){
					func(c,a,b);
				}
				else{
					func(b,a,c);
				}
			}
			else{
				if(a<c){
					func(c,a,b);
				}
				else{
					func(a,b,c);
				}
			} a<b a b {
				if(b<c){
					func(c,a,b);
				}
				else{
					func(b,a,c);
				}
			} if(b<c){
					func(c,a,b);
				}
				else{
					func(b,a,c);
				} b<c b c {
					func(c,a,b);
				} func(c,a,b) func c a b {
					func(b,a,c);
				} func(b,a,c) func b a c {
				if(a<c){
					func(c,a,b);
				}
				else{
					func(a,b,c);
				}
			} if(a<c){
					func(c,a,b);
				}
				else{
					func(a,b,c);
				} a<c a c {
					func(c,a,b);
				} func(c,a,b) func c a b {
					func(a,b,c);
				} func(a,b,c) func a b c String[] args args static void func(int a,int b,int c){
		if(Math.pow(a,2) == (Math.pow(b,2)+Math.pow(c,2))){
			System.out.println("YES");
		}
		else{
			System.out.println("NO");
		}
	} func {
		if(Math.pow(a,2) == (Math.pow(b,2)+Math.pow(c,2))){
			System.out.println("YES");
		}
		else{
			System.out.println("NO");
		}
	} if(Math.pow(a,2) == (Math.pow(b,2)+Math.pow(c,2))){
			System.out.println("YES");
		}
		else{
			System.out.println("NO");
		} Math.pow(a,2) == (Math.pow(b,2)+Math.pow(c,2)) Math.pow(a,2) Math.pow Math a 2 (Math.pow(b,2)+Math.pow(c,2)) Math.pow(b,2) Math.pow Math b 2 Math.pow(c,2) Math.pow Math c 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" int a a int b b int c c public class Main {
	public static void main(String[] args){
		Scanner stdIn = new Scanner(System.in);
		int n = stdIn.nextInt();
		for(int i=0;i<n;i++){
			int a = stdIn.nextInt();
			int b = stdIn.nextInt();
			int c = stdIn.nextInt();
			
			if(a<b){
				if(b<c){
					func(c,a,b);
				}
				else{
					func(b,a,c);
				}
			}
			else{
				if(a<c){
					func(c,a,b);
				}
				else{
					func(a,b,c);
				}
			}
		}
	}
	
	static void func(int a,int b,int c){
		if(Math.pow(a,2) == (Math.pow(b,2)+Math.pow(c,2))){
			System.out.println("YES");
		}
		else{
			System.out.println("NO");
		}
	}
} public class Main {
	public static void main(String[] args){
		Scanner stdIn = new Scanner(System.in);
		int n = stdIn.nextInt();
		for(int i=0;i<n;i++){
			int a = stdIn.nextInt();
			int b = stdIn.nextInt();
			int c = stdIn.nextInt();
			
			if(a<b){
				if(b<c){
					func(c,a,b);
				}
				else{
					func(b,a,c);
				}
			}
			else{
				if(a<c){
					func(c,a,b);
				}
				else{
					func(a,b,c);
				}
			}
		}
	}
	
	static void func(int a,int b,int c){
		if(Math.pow(a,2) == (Math.pow(b,2)+Math.pow(c,2))){
			System.out.println("YES");
		}
		else{
			System.out.println("NO");
		}
	}
} Main

import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner stdIn = new Scanner(System.in);
		int n = stdIn.nextInt();
		for(int i=0;i<n;i++){
			int a = stdIn.nextInt();
			int b = stdIn.nextInt();
			int c = stdIn.nextInt();
			
			if(a<b){
				if(b<c){
					func(c,a,b);
				}
				else{
					func(b,a,c);
				}
			}
			else{
				if(a<c){
					func(c,a,b);
				}
				else{
					func(a,b,c);
				}
			}
		}
	}
	
	static void func(int a,int b,int c){
		if(Math.pow(a,2) == (Math.pow(b,2)+Math.pow(c,2))){
			System.out.println("YES");
		}
		else{
			System.out.println("NO");
		}
	}
}