import java.io.*;
import java.util.*;

class Main{
	private static ArrayList<String> tri_check(ArrayList<Integer> a){
		ArrayList<String> b = new ArrayList<String>();
		
		for(int i = 0;i<a.size()/3;i++){
			int x2,y2,z2;

			x2 = a.get(i*3)*a.get(i*3);
			y2 = a.get(i*3+1)*a.get(i*3+1);
			z2 = a.get(i*3+2)*a.get(i*3+2);
			
			if((x2+ y2) == z2 || (x2 + z2) == y2 || (y2 + z2) == x2)b.add("YES");  
			else b.add("NO");
			}
		return b;
	}
	private static void print_tri(ArrayList<String> a){
		for(int i = 0;i<a.size();i++){
			System.out.println(a.get(i));
		}
	}
		public static void main(String args[]) throws IOException{
			ArrayList<Integer> tri = new ArrayList<Integer>();
			Scanner scan = new Scanner(System.in);
			
			int a;
			
			a = Integer.parseInt(scan.next());
			
			for(int i = a;i > 0;i--){
				try{
					for(int j = 0;j<3;j++){
						String str1 = scan.next();
						
						tri.add(Integer.parseInt(str1));
						}
					}
				catch(NumberFormatException e){
					break;
				}
			}
			ArrayList<String> res = new ArrayList<String>();
			res = tri_check(tri);
			print_tri(res);
	}
} import java.io.*; io.* java import java.util.*; util.* java class Main{
	private static ArrayList<String> tri_check(ArrayList<Integer> a){
		ArrayList<String> b = new ArrayList<String>();
		
		for(int i = 0;i<a.size()/3;i++){
			int x2,y2,z2;

			x2 = a.get(i*3)*a.get(i*3);
			y2 = a.get(i*3+1)*a.get(i*3+1);
			z2 = a.get(i*3+2)*a.get(i*3+2);
			
			if((x2+ y2) == z2 || (x2 + z2) == y2 || (y2 + z2) == x2)b.add("YES");  
			else b.add("NO");
			}
		return b;
	}
	private static void print_tri(ArrayList<String> a){
		for(int i = 0;i<a.size();i++){
			System.out.println(a.get(i));
		}
	}
		public static void main(String args[]) throws IOException{
			ArrayList<Integer> tri = new ArrayList<Integer>();
			Scanner scan = new Scanner(System.in);
			
			int a;
			
			a = Integer.parseInt(scan.next());
			
			for(int i = a;i > 0;i--){
				try{
					for(int j = 0;j<3;j++){
						String str1 = scan.next();
						
						tri.add(Integer.parseInt(str1));
						}
					}
				catch(NumberFormatException e){
					break;
				}
			}
			ArrayList<String> res = new ArrayList<String>();
			res = tri_check(tri);
			print_tri(res);
	}
} Main private static ArrayList<String> tri_check(ArrayList<Integer> a){
		ArrayList<String> b = new ArrayList<String>();
		
		for(int i = 0;i<a.size()/3;i++){
			int x2,y2,z2;

			x2 = a.get(i*3)*a.get(i*3);
			y2 = a.get(i*3+1)*a.get(i*3+1);
			z2 = a.get(i*3+2)*a.get(i*3+2);
			
			if((x2+ y2) == z2 || (x2 + z2) == y2 || (y2 + z2) == x2)b.add("YES");  
			else b.add("NO");
			}
		return b;
	} tri_check {
		ArrayList<String> b = new ArrayList<String>();
		
		for(int i = 0;i<a.size()/3;i++){
			int x2,y2,z2;

			x2 = a.get(i*3)*a.get(i*3);
			y2 = a.get(i*3+1)*a.get(i*3+1);
			z2 = a.get(i*3+2)*a.get(i*3+2);
			
			if((x2+ y2) == z2 || (x2 + z2) == y2 || (y2 + z2) == x2)b.add("YES");  
			else b.add("NO");
			}
		return b;
	} ArrayList<String> b = new ArrayList<String>(); b new ArrayList<String>() for(int i = 0;i<a.size()/3;i++){
			int x2,y2,z2;

			x2 = a.get(i*3)*a.get(i*3);
			y2 = a.get(i*3+1)*a.get(i*3+1);
			z2 = a.get(i*3+2)*a.get(i*3+2);
			
			if((x2+ y2) == z2 || (x2 + z2) == y2 || (y2 + z2) == x2)b.add("YES");  
			else b.add("NO");
			} int i = 0; int i = 0; i 0 i<a.size()/3 i a.size()/3 a.size() a.size a 3 i++ i++ i {
			int x2,y2,z2;

			x2 = a.get(i*3)*a.get(i*3);
			y2 = a.get(i*3+1)*a.get(i*3+1);
			z2 = a.get(i*3+2)*a.get(i*3+2);
			
			if((x2+ y2) == z2 || (x2 + z2) == y2 || (y2 + z2) == x2)b.add("YES");  
			else b.add("NO");
			} {
			int x2,y2,z2;

			x2 = a.get(i*3)*a.get(i*3);
			y2 = a.get(i*3+1)*a.get(i*3+1);
			z2 = a.get(i*3+2)*a.get(i*3+2);
			
			if((x2+ y2) == z2 || (x2 + z2) == y2 || (y2 + z2) == x2)b.add("YES");  
			else b.add("NO");
			} int x2 x2 y2 y2 z2; z2 x2 = a.get(i*3)*a.get(i*3) x2 a.get(i*3)*a.get(i*3) a.get(i*3) a.get a i*3 i 3 a.get(i*3) a.get a i*3 i 3 y2 = a.get(i*3+1)*a.get(i*3+1) y2 a.get(i*3+1)*a.get(i*3+1) a.get(i*3+1) a.get a i*3+1 i*3 i 3 1 a.get(i*3+1) a.get a i*3+1 i*3 i 3 1 z2 = a.get(i*3+2)*a.get(i*3+2) z2 a.get(i*3+2)*a.get(i*3+2) a.get(i*3+2) a.get a i*3+2 i*3 i 3 2 a.get(i*3+2) a.get a i*3+2 i*3 i 3 2 if((x2+ y2) == z2 || (x2 + z2) == y2 || (y2 + z2) == x2)b.add("YES");  
			else b.add("NO"); (x2+ y2) == z2 || (x2 + z2) == y2 || (y2 + z2) == x2 (x2+ y2) == z2 || (x2 + z2) == y2 || (y2 + z2) == x2 (x2+ y2) == z2 (x2+ y2) x2 y2 z2 (x2 + z2) == y2 (x2 + z2) x2 z2 y2 (y2 + z2) == x2 (y2 + z2) y2 z2 x2 b.add("YES") b.add b "YES" b.add("NO") b.add b "NO" return b; b ArrayList<Integer> a a private static void print_tri(ArrayList<String> a){
		for(int i = 0;i<a.size();i++){
			System.out.println(a.get(i));
		}
	} print_tri {
		for(int i = 0;i<a.size();i++){
			System.out.println(a.get(i));
		}
	} for(int i = 0;i<a.size();i++){
			System.out.println(a.get(i));
		} int i = 0; int i = 0; i 0 i<a.size() i a.size() a.size a i++ i++ i {
			System.out.println(a.get(i));
		} {
			System.out.println(a.get(i));
		} System.out.println(a.get(i)) System.out.println System.out System System.out a.get(i) a.get a i ArrayList<String> a a public static void main(String args[]) throws IOException{
			ArrayList<Integer> tri = new ArrayList<Integer>();
			Scanner scan = new Scanner(System.in);
			
			int a;
			
			a = Integer.parseInt(scan.next());
			
			for(int i = a;i > 0;i--){
				try{
					for(int j = 0;j<3;j++){
						String str1 = scan.next();
						
						tri.add(Integer.parseInt(str1));
						}
					}
				catch(NumberFormatException e){
					break;
				}
			}
			ArrayList<String> res = new ArrayList<String>();
			res = tri_check(tri);
			print_tri(res);
	} main {
			ArrayList<Integer> tri = new ArrayList<Integer>();
			Scanner scan = new Scanner(System.in);
			
			int a;
			
			a = Integer.parseInt(scan.next());
			
			for(int i = a;i > 0;i--){
				try{
					for(int j = 0;j<3;j++){
						String str1 = scan.next();
						
						tri.add(Integer.parseInt(str1));
						}
					}
				catch(NumberFormatException e){
					break;
				}
			}
			ArrayList<String> res = new ArrayList<String>();
			res = tri_check(tri);
			print_tri(res);
	} ArrayList<Integer> tri = new ArrayList<Integer>(); tri new ArrayList<Integer>() Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int a; a a = Integer.parseInt(scan.next()) a Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan for(int i = a;i > 0;i--){
				try{
					for(int j = 0;j<3;j++){
						String str1 = scan.next();
						
						tri.add(Integer.parseInt(str1));
						}
					}
				catch(NumberFormatException e){
					break;
				}
			} int i = a; int i = a; i a i > 0 i 0 i-- i-- i {
				try{
					for(int j = 0;j<3;j++){
						String str1 = scan.next();
						
						tri.add(Integer.parseInt(str1));
						}
					}
				catch(NumberFormatException e){
					break;
				}
			} {
				try{
					for(int j = 0;j<3;j++){
						String str1 = scan.next();
						
						tri.add(Integer.parseInt(str1));
						}
					}
				catch(NumberFormatException e){
					break;
				}
			} try{
					for(int j = 0;j<3;j++){
						String str1 = scan.next();
						
						tri.add(Integer.parseInt(str1));
						}
					}
				catch(NumberFormatException e){
					break;
				} catch(NumberFormatException e){
					break;
				} NumberFormatException e {
					break;
				} break; {
					for(int j = 0;j<3;j++){
						String str1 = scan.next();
						
						tri.add(Integer.parseInt(str1));
						}
					} for(int j = 0;j<3;j++){
						String str1 = scan.next();
						
						tri.add(Integer.parseInt(str1));
						} int j = 0; int j = 0; j 0 j<3 j 3 j++ j++ j {
						String str1 = scan.next();
						
						tri.add(Integer.parseInt(str1));
						} {
						String str1 = scan.next();
						
						tri.add(Integer.parseInt(str1));
						} String str1 = scan.next(); str1 scan.next() scan.next scan tri.add(Integer.parseInt(str1)) tri.add tri Integer.parseInt(str1) Integer.parseInt Integer str1 ArrayList<String> res = new ArrayList<String>(); res new ArrayList<String>() res = tri_check(tri) res tri_check(tri) tri_check tri print_tri(res) print_tri res String args[] args
import java.io.*;
import java.util.*;

class Main{
	private static ArrayList<String> tri_check(ArrayList<Integer> a){
		ArrayList<String> b = new ArrayList<String>();
		
		for(int i = 0;i<a.size()/3;i++){
			int x2,y2,z2;

			x2 = a.get(i*3)*a.get(i*3);
			y2 = a.get(i*3+1)*a.get(i*3+1);
			z2 = a.get(i*3+2)*a.get(i*3+2);
			
			if((x2+ y2) == z2 || (x2 + z2) == y2 || (y2 + z2) == x2)b.add("YES");  
			else b.add("NO");
			}
		return b;
	}
	private static void print_tri(ArrayList<String> a){
		for(int i = 0;i<a.size();i++){
			System.out.println(a.get(i));
		}
	}
		public static void main(String args[]) throws IOException{
			ArrayList<Integer> tri = new ArrayList<Integer>();
			Scanner scan = new Scanner(System.in);
			
			int a;
			
			a = Integer.parseInt(scan.next());
			
			for(int i = a;i > 0;i--){
				try{
					for(int j = 0;j<3;j++){
						String str1 = scan.next();
						
						tri.add(Integer.parseInt(str1));
						}
					}
				catch(NumberFormatException e){
					break;
				}
			}
			ArrayList<String> res = new ArrayList<String>();
			res = tri_check(tri);
			print_tri(res);
	}
}