import java.util.*;

public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		List<String> list = new ArrayList<String>();
		boolean flag = false;
		int[] tri = new int[3];
		int N = scan.nextInt();
		for(int a = 0; a < N; a++){
			for(int i = 0; i < 3; i++){
				tri[i] = scan.nextInt();
			}
			for(int i = 0; i < 3 - 1; i++){
				for(int j = 3 - 1; j > i; j--){
					if(tri[i] < tri[j]){
						int big = tri[j];
						tri[j] = tri[i];
						tri[i] = big;
					}
				}
			}
			// System.out.printf("%d %d %d\n", tri[0], tri[1], tri[2]);
			if(Math.pow(tri[0], 2) == Math.pow(tri[1], 2) + Math.pow(tri[2], 2)){
				// System.out.println("YES");
				flag = true;
			} else{
				// System.out.println("NO");
				flag = false;
			}
			list.add(flag? "YES" : "NO");
		}

		for(String s : list){
			System.out.println(s);
		}
	}
} import java.util.*; util.* java public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		List<String> list = new ArrayList<String>();
		boolean flag = false;
		int[] tri = new int[3];
		int N = scan.nextInt();
		for(int a = 0; a < N; a++){
			for(int i = 0; i < 3; i++){
				tri[i] = scan.nextInt();
			}
			for(int i = 0; i < 3 - 1; i++){
				for(int j = 3 - 1; j > i; j--){
					if(tri[i] < tri[j]){
						int big = tri[j];
						tri[j] = tri[i];
						tri[i] = big;
					}
				}
			}
			// System.out.printf("%d %d %d\n", tri[0], tri[1], tri[2]);
			if(Math.pow(tri[0], 2) == Math.pow(tri[1], 2) + Math.pow(tri[2], 2)){
				// System.out.println("YES");
				flag = true;
			} else{
				// System.out.println("NO");
				flag = false;
			}
			list.add(flag? "YES" : "NO");
		}

		for(String s : list){
			System.out.println(s);
		}
	}
} Main private static final Scanner scan = new Scanner(System.in); scan new Scanner(System.in) public static void main(String[] args){
		List<String> list = new ArrayList<String>();
		boolean flag = false;
		int[] tri = new int[3];
		int N = scan.nextInt();
		for(int a = 0; a < N; a++){
			for(int i = 0; i < 3; i++){
				tri[i] = scan.nextInt();
			}
			for(int i = 0; i < 3 - 1; i++){
				for(int j = 3 - 1; j > i; j--){
					if(tri[i] < tri[j]){
						int big = tri[j];
						tri[j] = tri[i];
						tri[i] = big;
					}
				}
			}
			// System.out.printf("%d %d %d\n", tri[0], tri[1], tri[2]);
			if(Math.pow(tri[0], 2) == Math.pow(tri[1], 2) + Math.pow(tri[2], 2)){
				// System.out.println("YES");
				flag = true;
			} else{
				// System.out.println("NO");
				flag = false;
			}
			list.add(flag? "YES" : "NO");
		}

		for(String s : list){
			System.out.println(s);
		}
	} main {
		List<String> list = new ArrayList<String>();
		boolean flag = false;
		int[] tri = new int[3];
		int N = scan.nextInt();
		for(int a = 0; a < N; a++){
			for(int i = 0; i < 3; i++){
				tri[i] = scan.nextInt();
			}
			for(int i = 0; i < 3 - 1; i++){
				for(int j = 3 - 1; j > i; j--){
					if(tri[i] < tri[j]){
						int big = tri[j];
						tri[j] = tri[i];
						tri[i] = big;
					}
				}
			}
			// System.out.printf("%d %d %d\n", tri[0], tri[1], tri[2]);
			if(Math.pow(tri[0], 2) == Math.pow(tri[1], 2) + Math.pow(tri[2], 2)){
				// System.out.println("YES");
				flag = true;
			} else{
				// System.out.println("NO");
				flag = false;
			}
			list.add(flag? "YES" : "NO");
		}

		for(String s : list){
			System.out.println(s);
		}
	} List<String> list = new ArrayList<String>(); list new ArrayList<String>() boolean flag = false; flag false int[] tri = new int[3]; tri new int[3] 3 int N = scan.nextInt(); N scan.nextInt() scan.nextInt scan for(int a = 0; a < N; a++){
			for(int i = 0; i < 3; i++){
				tri[i] = scan.nextInt();
			}
			for(int i = 0; i < 3 - 1; i++){
				for(int j = 3 - 1; j > i; j--){
					if(tri[i] < tri[j]){
						int big = tri[j];
						tri[j] = tri[i];
						tri[i] = big;
					}
				}
			}
			// System.out.printf("%d %d %d\n", tri[0], tri[1], tri[2]);
			if(Math.pow(tri[0], 2) == Math.pow(tri[1], 2) + Math.pow(tri[2], 2)){
				// System.out.println("YES");
				flag = true;
			} else{
				// System.out.println("NO");
				flag = false;
			}
			list.add(flag? "YES" : "NO");
		} int a = 0; int a = 0; a 0 a < N a N a++ a++ a {
			for(int i = 0; i < 3; i++){
				tri[i] = scan.nextInt();
			}
			for(int i = 0; i < 3 - 1; i++){
				for(int j = 3 - 1; j > i; j--){
					if(tri[i] < tri[j]){
						int big = tri[j];
						tri[j] = tri[i];
						tri[i] = big;
					}
				}
			}
			// System.out.printf("%d %d %d\n", tri[0], tri[1], tri[2]);
			if(Math.pow(tri[0], 2) == Math.pow(tri[1], 2) + Math.pow(tri[2], 2)){
				// System.out.println("YES");
				flag = true;
			} else{
				// System.out.println("NO");
				flag = false;
			}
			list.add(flag? "YES" : "NO");
		} {
			for(int i = 0; i < 3; i++){
				tri[i] = scan.nextInt();
			}
			for(int i = 0; i < 3 - 1; i++){
				for(int j = 3 - 1; j > i; j--){
					if(tri[i] < tri[j]){
						int big = tri[j];
						tri[j] = tri[i];
						tri[i] = big;
					}
				}
			}
			// System.out.printf("%d %d %d\n", tri[0], tri[1], tri[2]);
			if(Math.pow(tri[0], 2) == Math.pow(tri[1], 2) + Math.pow(tri[2], 2)){
				// System.out.println("YES");
				flag = true;
			} else{
				// System.out.println("NO");
				flag = false;
			}
			list.add(flag? "YES" : "NO");
		} for(int i = 0; i < 3; i++){
				tri[i] = scan.nextInt();
			} int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {
				tri[i] = scan.nextInt();
			} {
				tri[i] = scan.nextInt();
			} tri[i] = scan.nextInt() tri[i] tri i scan.nextInt() scan.nextInt scan for(int i = 0; i < 3 - 1; i++){
				for(int j = 3 - 1; j > i; j--){
					if(tri[i] < tri[j]){
						int big = tri[j];
						tri[j] = tri[i];
						tri[i] = big;
					}
				}
			} int i = 0; int i = 0; i 0 i < 3 - 1 i 3 - 1 3 1 i++ i++ i {
				for(int j = 3 - 1; j > i; j--){
					if(tri[i] < tri[j]){
						int big = tri[j];
						tri[j] = tri[i];
						tri[i] = big;
					}
				}
			} {
				for(int j = 3 - 1; j > i; j--){
					if(tri[i] < tri[j]){
						int big = tri[j];
						tri[j] = tri[i];
						tri[i] = big;
					}
				}
			} for(int j = 3 - 1; j > i; j--){
					if(tri[i] < tri[j]){
						int big = tri[j];
						tri[j] = tri[i];
						tri[i] = big;
					}
				} int j = 3 - 1; int j = 3 - 1; j 3 - 1 3 1 j > i j i j-- j-- j {
					if(tri[i] < tri[j]){
						int big = tri[j];
						tri[j] = tri[i];
						tri[i] = big;
					}
				} {
					if(tri[i] < tri[j]){
						int big = tri[j];
						tri[j] = tri[i];
						tri[i] = big;
					}
				} if(tri[i] < tri[j]){
						int big = tri[j];
						tri[j] = tri[i];
						tri[i] = big;
					} tri[i] < tri[j] tri[i] tri i tri[j] tri j {
						int big = tri[j];
						tri[j] = tri[i];
						tri[i] = big;
					} int big = tri[j]; big tri[j] tri j tri[j] = tri[i] tri[j] tri j tri[i] tri i tri[i] = big tri[i] tri i big if(Math.pow(tri[0], 2) == Math.pow(tri[1], 2) + Math.pow(tri[2], 2)){
				// System.out.println("YES");
				flag = true;
			} else{
				// System.out.println("NO");
				flag = false;
			} Math.pow(tri[0], 2) == Math.pow(tri[1], 2) + Math.pow(tri[2], 2) Math.pow(tri[0], 2) Math.pow Math tri[0] tri 0 2 Math.pow(tri[1], 2) + Math.pow(tri[2], 2) Math.pow(tri[1], 2) Math.pow Math tri[1] tri 1 2 Math.pow(tri[2], 2) Math.pow Math tri[2] tri 2 2 {
				// System.out.println("YES");
				flag = true;
			} flag = true flag true {
				// System.out.println("NO");
				flag = false;
			} flag = false flag false list.add(flag? "YES" : "NO") list.add list flag? "YES" : "NO" flag "YES" "NO" for(String s : list){
			System.out.println(s);
		} String s list {
			System.out.println(s);
		} {
			System.out.println(s);
		} System.out.println(s) System.out.println System.out System System.out s String[] args args public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		List<String> list = new ArrayList<String>();
		boolean flag = false;
		int[] tri = new int[3];
		int N = scan.nextInt();
		for(int a = 0; a < N; a++){
			for(int i = 0; i < 3; i++){
				tri[i] = scan.nextInt();
			}
			for(int i = 0; i < 3 - 1; i++){
				for(int j = 3 - 1; j > i; j--){
					if(tri[i] < tri[j]){
						int big = tri[j];
						tri[j] = tri[i];
						tri[i] = big;
					}
				}
			}
			// System.out.printf("%d %d %d\n", tri[0], tri[1], tri[2]);
			if(Math.pow(tri[0], 2) == Math.pow(tri[1], 2) + Math.pow(tri[2], 2)){
				// System.out.println("YES");
				flag = true;
			} else{
				// System.out.println("NO");
				flag = false;
			}
			list.add(flag? "YES" : "NO");
		}

		for(String s : list){
			System.out.println(s);
		}
	}
} public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		List<String> list = new ArrayList<String>();
		boolean flag = false;
		int[] tri = new int[3];
		int N = scan.nextInt();
		for(int a = 0; a < N; a++){
			for(int i = 0; i < 3; i++){
				tri[i] = scan.nextInt();
			}
			for(int i = 0; i < 3 - 1; i++){
				for(int j = 3 - 1; j > i; j--){
					if(tri[i] < tri[j]){
						int big = tri[j];
						tri[j] = tri[i];
						tri[i] = big;
					}
				}
			}
			// System.out.printf("%d %d %d\n", tri[0], tri[1], tri[2]);
			if(Math.pow(tri[0], 2) == Math.pow(tri[1], 2) + Math.pow(tri[2], 2)){
				// System.out.println("YES");
				flag = true;
			} else{
				// System.out.println("NO");
				flag = false;
			}
			list.add(flag? "YES" : "NO");
		}

		for(String s : list){
			System.out.println(s);
		}
	}
} Main
import java.util.*;

public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		List<String> list = new ArrayList<String>();
		boolean flag = false;
		int[] tri = new int[3];
		int N = scan.nextInt();
		for(int a = 0; a < N; a++){
			for(int i = 0; i < 3; i++){
				tri[i] = scan.nextInt();
			}
			for(int i = 0; i < 3 - 1; i++){
				for(int j = 3 - 1; j > i; j--){
					if(tri[i] < tri[j]){
						int big = tri[j];
						tri[j] = tri[i];
						tri[i] = big;
					}
				}
			}
			// System.out.printf("%d %d %d\n", tri[0], tri[1], tri[2]);
			if(Math.pow(tri[0], 2) == Math.pow(tri[1], 2) + Math.pow(tri[2], 2)){
				// System.out.println("YES");
				flag = true;
			} else{
				// System.out.println("NO");
				flag = false;
			}
			list.add(flag? "YES" : "NO");
		}

		for(String s : list){
			System.out.println(s);
		}
	}
}