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

public class Main{
	
	static final Scanner s=new Scanner(System.in);
	
	public static void main(String args[]){
		for(int i=s.nextInt(); i>0; i--){
			int[] in={s.nextInt(),s.nextInt(),s.nextInt()};
			Arrays.sort(in);
			System.out.println(
					in[2]*in[2]==(in[1]*in[1]+in[0]*in[0])
					?"YES":"NO");
		}
	}
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main{
	
	static final Scanner s=new Scanner(System.in);
	
	public static void main(String args[]){
		for(int i=s.nextInt(); i>0; i--){
			int[] in={s.nextInt(),s.nextInt(),s.nextInt()};
			Arrays.sort(in);
			System.out.println(
					in[2]*in[2]==(in[1]*in[1]+in[0]*in[0])
					?"YES":"NO");
		}
	}
} Main static final Scanner s=new Scanner(System.in); s new Scanner(System.in) public static void main(String args[]){
		for(int i=s.nextInt(); i>0; i--){
			int[] in={s.nextInt(),s.nextInt(),s.nextInt()};
			Arrays.sort(in);
			System.out.println(
					in[2]*in[2]==(in[1]*in[1]+in[0]*in[0])
					?"YES":"NO");
		}
	} main {
		for(int i=s.nextInt(); i>0; i--){
			int[] in={s.nextInt(),s.nextInt(),s.nextInt()};
			Arrays.sort(in);
			System.out.println(
					in[2]*in[2]==(in[1]*in[1]+in[0]*in[0])
					?"YES":"NO");
		}
	} for(int i=s.nextInt(); i>0; i--){
			int[] in={s.nextInt(),s.nextInt(),s.nextInt()};
			Arrays.sort(in);
			System.out.println(
					in[2]*in[2]==(in[1]*in[1]+in[0]*in[0])
					?"YES":"NO");
		} int i=s.nextInt(); int i=s.nextInt(); i s.nextInt() s.nextInt s i>0 i 0 i-- i-- i {
			int[] in={s.nextInt(),s.nextInt(),s.nextInt()};
			Arrays.sort(in);
			System.out.println(
					in[2]*in[2]==(in[1]*in[1]+in[0]*in[0])
					?"YES":"NO");
		} {
			int[] in={s.nextInt(),s.nextInt(),s.nextInt()};
			Arrays.sort(in);
			System.out.println(
					in[2]*in[2]==(in[1]*in[1]+in[0]*in[0])
					?"YES":"NO");
		} int[] in={s.nextInt(),s.nextInt(),s.nextInt()}; in {s.nextInt(),s.nextInt(),s.nextInt()} s.nextInt() s.nextInt s s.nextInt() s.nextInt s s.nextInt() s.nextInt s Arrays.sort(in) Arrays.sort Arrays in System.out.println(
					in[2]*in[2]==(in[1]*in[1]+in[0]*in[0])
					?"YES":"NO") System.out.println System.out System System.out in[2]*in[2]==(in[1]*in[1]+in[0]*in[0])
					?"YES":"NO" in[2]*in[2]==(in[1]*in[1]+in[0]*in[0]) in[2]*in[2] in[2] in 2 in[2] in 2 (in[1]*in[1]+in[0]*in[0]) in[1]*in[1] in[1] in 1 in[1] in 1 in[0]*in[0] in[0] in 0 in[0] in 0 "YES" "NO" String args[] args public class Main{
	
	static final Scanner s=new Scanner(System.in);
	
	public static void main(String args[]){
		for(int i=s.nextInt(); i>0; i--){
			int[] in={s.nextInt(),s.nextInt(),s.nextInt()};
			Arrays.sort(in);
			System.out.println(
					in[2]*in[2]==(in[1]*in[1]+in[0]*in[0])
					?"YES":"NO");
		}
	}
} public class Main{
	
	static final Scanner s=new Scanner(System.in);
	
	public static void main(String args[]){
		for(int i=s.nextInt(); i>0; i--){
			int[] in={s.nextInt(),s.nextInt(),s.nextInt()};
			Arrays.sort(in);
			System.out.println(
					in[2]*in[2]==(in[1]*in[1]+in[0]*in[0])
					?"YES":"NO");
		}
	}
} Main
import java.util.Arrays;
import java.util.Scanner;

public class Main{
	
	static final Scanner s=new Scanner(System.in);
	
	public static void main(String args[]){
		for(int i=s.nextInt(); i>0; i--){
			int[] in={s.nextInt(),s.nextInt(),s.nextInt()};
			Arrays.sort(in);
			System.out.println(
					in[2]*in[2]==(in[1]*in[1]+in[0]*in[0])
					?"YES":"NO");
		}
	}
}