import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		
		for(int i=1; i<=N; i++) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			int c = sc.nextInt();
			
			if(a < c && b < c) {
				if(c * c == a * a + b * b) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
			} else if(a < b && c < b) {
				if(b * b == a * a + c * c) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
			} else {
				if(a * a == b * b + c * c) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
			}
		}
		sc.close();
	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		
		for(int i=1; i<=N; i++) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			int c = sc.nextInt();
			
			if(a < c && b < c) {
				if(c * c == a * a + b * b) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
			} else if(a < b && c < b) {
				if(b * b == a * a + c * c) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
			} else {
				if(a * a == b * b + c * c) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
			}
		}
		sc.close();
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		
		for(int i=1; i<=N; i++) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			int c = sc.nextInt();
			
			if(a < c && b < c) {
				if(c * c == a * a + b * b) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
			} else if(a < b && c < b) {
				if(b * b == a * a + c * c) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
			} else {
				if(a * a == b * b + c * c) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
			}
		}
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		
		for(int i=1; i<=N; i++) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			int c = sc.nextInt();
			
			if(a < c && b < c) {
				if(c * c == a * a + b * b) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
			} else if(a < b && c < b) {
				if(b * b == a * a + c * c) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
			} else {
				if(a * a == b * b + c * c) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
			}
		}
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc for(int i=1; i<=N; i++) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			int c = sc.nextInt();
			
			if(a < c && b < c) {
				if(c * c == a * a + b * b) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
			} else if(a < b && c < b) {
				if(b * b == a * a + c * c) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
			} else {
				if(a * a == b * b + c * c) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
			}
		} int i=1; int i=1; i 1 i<=N i N i++ i++ i {
			int a = sc.nextInt();
			int b = sc.nextInt();
			int c = sc.nextInt();
			
			if(a < c && b < c) {
				if(c * c == a * a + b * b) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
			} else if(a < b && c < b) {
				if(b * b == a * a + c * c) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
			} else {
				if(a * a == b * b + c * c) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
			}
		} {
			int a = sc.nextInt();
			int b = sc.nextInt();
			int c = sc.nextInt();
			
			if(a < c && b < c) {
				if(c * c == a * a + b * b) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
			} else if(a < b && c < b) {
				if(b * b == a * a + c * c) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
			} else {
				if(a * a == b * b + c * c) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
			}
		} int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc int c = sc.nextInt(); c sc.nextInt() sc.nextInt sc if(a < c && b < c) {
				if(c * c == a * a + b * b) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
			} else if(a < b && c < b) {
				if(b * b == a * a + c * c) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
			} else {
				if(a * a == b * b + c * c) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
			} a < c && b < c a < c a c b < c b c {
				if(c * c == a * a + b * b) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
			} if(c * c == a * a + b * b) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				} c * c == a * a + b * b c * c c c a * a + b * b a * a a a b * b b b {
					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" if(a < b && c < b) {
				if(b * b == a * a + c * c) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
			} else {
				if(a * a == b * b + c * c) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
			} a < b && c < b a < b a b c < b c b {
				if(b * b == a * a + c * c) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
			} if(b * b == a * a + c * c) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				} b * b == a * a + c * c b * b b b a * a + c * c a * a a a c * c c c {
					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" {
				if(a * a == b * b + c * c) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
			} if(a * a == b * b + c * c) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				} a * a == b * b + c * c a * a a a b * b + c * c b * b b b c * c c c {
					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" sc.close() sc.close sc String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		
		for(int i=1; i<=N; i++) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			int c = sc.nextInt();
			
			if(a < c && b < c) {
				if(c * c == a * a + b * b) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
			} else if(a < b && c < b) {
				if(b * b == a * a + c * c) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
			} else {
				if(a * a == b * b + c * c) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
			}
		}
		sc.close();
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		
		for(int i=1; i<=N; i++) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			int c = sc.nextInt();
			
			if(a < c && b < c) {
				if(c * c == a * a + b * b) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
			} else if(a < b && c < b) {
				if(b * b == a * a + c * c) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
			} else {
				if(a * a == b * b + c * c) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
			}
		}
		sc.close();
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		
		for(int i=1; i<=N; i++) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			int c = sc.nextInt();
			
			if(a < c && b < c) {
				if(c * c == a * a + b * b) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
			} else if(a < b && c < b) {
				if(b * b == a * a + c * c) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
			} else {
				if(a * a == b * b + c * c) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
			}
		}
		sc.close();
	}

}