import java.io.*;
import java.util.*;
public class Main{
	public static void main(String[] args)throws IOException{
		BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
		String s=reader.readLine();
		int n=Integer.parseInt(s);
		for(int j=0;j<n;j++){
			s=reader.readLine();
			String t[] =s.split(" ");
			int[] in=new int[t.length];
			for(int i=0;i<t.length;i++)
				in[i]=Integer.parseInt(t[i]);
			Arrays.sort(in);
			String ans;
			if(in[0]*in[0]+in[1]*in[1]==in[2]*in[2])
				ans="YES";
			else ans="NO";
			System.out.println(ans);
		}
	
	}
} import java.io.*; io.* java import java.util.*; util.* java public class Main{
	public static void main(String[] args)throws IOException{
		BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
		String s=reader.readLine();
		int n=Integer.parseInt(s);
		for(int j=0;j<n;j++){
			s=reader.readLine();
			String t[] =s.split(" ");
			int[] in=new int[t.length];
			for(int i=0;i<t.length;i++)
				in[i]=Integer.parseInt(t[i]);
			Arrays.sort(in);
			String ans;
			if(in[0]*in[0]+in[1]*in[1]==in[2]*in[2])
				ans="YES";
			else ans="NO";
			System.out.println(ans);
		}
	
	}
} Main public static void main(String[] args)throws IOException{
		BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
		String s=reader.readLine();
		int n=Integer.parseInt(s);
		for(int j=0;j<n;j++){
			s=reader.readLine();
			String t[] =s.split(" ");
			int[] in=new int[t.length];
			for(int i=0;i<t.length;i++)
				in[i]=Integer.parseInt(t[i]);
			Arrays.sort(in);
			String ans;
			if(in[0]*in[0]+in[1]*in[1]==in[2]*in[2])
				ans="YES";
			else ans="NO";
			System.out.println(ans);
		}
	
	} main {
		BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
		String s=reader.readLine();
		int n=Integer.parseInt(s);
		for(int j=0;j<n;j++){
			s=reader.readLine();
			String t[] =s.split(" ");
			int[] in=new int[t.length];
			for(int i=0;i<t.length;i++)
				in[i]=Integer.parseInt(t[i]);
			Arrays.sort(in);
			String ans;
			if(in[0]*in[0]+in[1]*in[1]==in[2]*in[2])
				ans="YES";
			else ans="NO";
			System.out.println(ans);
		}
	
	} BufferedReader reader=new BufferedReader(new InputStreamReader(System.in)); reader new BufferedReader(new InputStreamReader(System.in)) String s=reader.readLine(); s reader.readLine() reader.readLine reader int n=Integer.parseInt(s); n Integer.parseInt(s) Integer.parseInt Integer s for(int j=0;j<n;j++){
			s=reader.readLine();
			String t[] =s.split(" ");
			int[] in=new int[t.length];
			for(int i=0;i<t.length;i++)
				in[i]=Integer.parseInt(t[i]);
			Arrays.sort(in);
			String ans;
			if(in[0]*in[0]+in[1]*in[1]==in[2]*in[2])
				ans="YES";
			else ans="NO";
			System.out.println(ans);
		} int j=0; int j=0; j 0 j<n j n j++ j++ j {
			s=reader.readLine();
			String t[] =s.split(" ");
			int[] in=new int[t.length];
			for(int i=0;i<t.length;i++)
				in[i]=Integer.parseInt(t[i]);
			Arrays.sort(in);
			String ans;
			if(in[0]*in[0]+in[1]*in[1]==in[2]*in[2])
				ans="YES";
			else ans="NO";
			System.out.println(ans);
		} {
			s=reader.readLine();
			String t[] =s.split(" ");
			int[] in=new int[t.length];
			for(int i=0;i<t.length;i++)
				in[i]=Integer.parseInt(t[i]);
			Arrays.sort(in);
			String ans;
			if(in[0]*in[0]+in[1]*in[1]==in[2]*in[2])
				ans="YES";
			else ans="NO";
			System.out.println(ans);
		} s=reader.readLine() s reader.readLine() reader.readLine reader String t[] =s.split(" "); t s.split(" ") s.split s " " int[] in=new int[t.length]; in new int[t.length] t.length t t.length for(int i=0;i<t.length;i++)
				in[i]=Integer.parseInt(t[i]); int i=0; int i=0; i 0 i<t.length i t.length t t.length i++ i++ i in[i]=Integer.parseInt(t[i]); in[i]=Integer.parseInt(t[i]) in[i] in i Integer.parseInt(t[i]) Integer.parseInt Integer t[i] t i Arrays.sort(in) Arrays.sort Arrays in String ans; ans if(in[0]*in[0]+in[1]*in[1]==in[2]*in[2])
				ans="YES";
			else ans="NO"; in[0]*in[0]+in[1]*in[1]==in[2]*in[2] in[0]*in[0]+in[1]*in[1] in[0]*in[0] in[0] in 0 in[0] in 0 in[1]*in[1] in[1] in 1 in[1] in 1 in[2]*in[2] in[2] in 2 in[2] in 2 ans="YES" ans "YES" ans="NO" ans "NO" System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main{
	public static void main(String[] args)throws IOException{
		BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
		String s=reader.readLine();
		int n=Integer.parseInt(s);
		for(int j=0;j<n;j++){
			s=reader.readLine();
			String t[] =s.split(" ");
			int[] in=new int[t.length];
			for(int i=0;i<t.length;i++)
				in[i]=Integer.parseInt(t[i]);
			Arrays.sort(in);
			String ans;
			if(in[0]*in[0]+in[1]*in[1]==in[2]*in[2])
				ans="YES";
			else ans="NO";
			System.out.println(ans);
		}
	
	}
} public class Main{
	public static void main(String[] args)throws IOException{
		BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
		String s=reader.readLine();
		int n=Integer.parseInt(s);
		for(int j=0;j<n;j++){
			s=reader.readLine();
			String t[] =s.split(" ");
			int[] in=new int[t.length];
			for(int i=0;i<t.length;i++)
				in[i]=Integer.parseInt(t[i]);
			Arrays.sort(in);
			String ans;
			if(in[0]*in[0]+in[1]*in[1]==in[2]*in[2])
				ans="YES";
			else ans="NO";
			System.out.println(ans);
		}
	
	}
} Main
import java.io.*;
import java.util.*;
public class Main{
	public static void main(String[] args)throws IOException{
		BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
		String s=reader.readLine();
		int n=Integer.parseInt(s);
		for(int j=0;j<n;j++){
			s=reader.readLine();
			String t[] =s.split(" ");
			int[] in=new int[t.length];
			for(int i=0;i<t.length;i++)
				in[i]=Integer.parseInt(t[i]);
			Arrays.sort(in);
			String ans;
			if(in[0]*in[0]+in[1]*in[1]==in[2]*in[2])
				ans="YES";
			else ans="NO";
			System.out.println(ans);
		}
	
	}
}