import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		while(n-- != 0){
			int a[] = new int[3];
			    for(int i = 0; i < 3; i++){
				    a[i]=(int)Math.pow(sc.nextInt(), 2);
			}
			System.out.println((a[0]+a[1]==a[2]||a[0]+a[2]==a[1]||a[2]+a[1]==a[0])?"YES":"NO");
		}
	}
} 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();
		while(n-- != 0){
			int a[] = new int[3];
			    for(int i = 0; i < 3; i++){
				    a[i]=(int)Math.pow(sc.nextInt(), 2);
			}
			System.out.println((a[0]+a[1]==a[2]||a[0]+a[2]==a[1]||a[2]+a[1]==a[0])?"YES":"NO");
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		while(n-- != 0){
			int a[] = new int[3];
			    for(int i = 0; i < 3; i++){
				    a[i]=(int)Math.pow(sc.nextInt(), 2);
			}
			System.out.println((a[0]+a[1]==a[2]||a[0]+a[2]==a[1]||a[2]+a[1]==a[0])?"YES":"NO");
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		while(n-- != 0){
			int a[] = new int[3];
			    for(int i = 0; i < 3; i++){
				    a[i]=(int)Math.pow(sc.nextInt(), 2);
			}
			System.out.println((a[0]+a[1]==a[2]||a[0]+a[2]==a[1]||a[2]+a[1]==a[0])?"YES":"NO");
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc while(n-- != 0){
			int a[] = new int[3];
			    for(int i = 0; i < 3; i++){
				    a[i]=(int)Math.pow(sc.nextInt(), 2);
			}
			System.out.println((a[0]+a[1]==a[2]||a[0]+a[2]==a[1]||a[2]+a[1]==a[0])?"YES":"NO");
		} n-- != 0 n-- n 0 {
			int a[] = new int[3];
			    for(int i = 0; i < 3; i++){
				    a[i]=(int)Math.pow(sc.nextInt(), 2);
			}
			System.out.println((a[0]+a[1]==a[2]||a[0]+a[2]==a[1]||a[2]+a[1]==a[0])?"YES":"NO");
		} int a[] = new int[3]; a new int[3] 3 for(int i = 0; i < 3; i++){
				    a[i]=(int)Math.pow(sc.nextInt(), 2);
			} int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {
				    a[i]=(int)Math.pow(sc.nextInt(), 2);
			} {
				    a[i]=(int)Math.pow(sc.nextInt(), 2);
			} a[i]=(int)Math.pow(sc.nextInt(), 2) a[i] a i (int)Math.pow(sc.nextInt(), 2) Math.pow Math sc.nextInt() sc.nextInt sc 2 System.out.println((a[0]+a[1]==a[2]||a[0]+a[2]==a[1]||a[2]+a[1]==a[0])?"YES":"NO") System.out.println System.out System System.out (a[0]+a[1]==a[2]||a[0]+a[2]==a[1]||a[2]+a[1]==a[0])?"YES":"NO" (a[0]+a[1]==a[2]||a[0]+a[2]==a[1]||a[2]+a[1]==a[0]) a[0]+a[1]==a[2]||a[0]+a[2]==a[1]||a[2]+a[1]==a[0] a[0]+a[1]==a[2] a[0]+a[1] a[0] a 0 a[1] a 1 a[2] a 2 a[0]+a[2]==a[1] a[0]+a[2] a[0] a 0 a[2] a 2 a[1] a 1 a[2]+a[1]==a[0] a[2]+a[1] a[2] a 2 a[1] a 1 a[0] a 0 "YES" "NO" String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		while(n-- != 0){
			int a[] = new int[3];
			    for(int i = 0; i < 3; i++){
				    a[i]=(int)Math.pow(sc.nextInt(), 2);
			}
			System.out.println((a[0]+a[1]==a[2]||a[0]+a[2]==a[1]||a[2]+a[1]==a[0])?"YES":"NO");
		}
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		while(n-- != 0){
			int a[] = new int[3];
			    for(int i = 0; i < 3; i++){
				    a[i]=(int)Math.pow(sc.nextInt(), 2);
			}
			System.out.println((a[0]+a[1]==a[2]||a[0]+a[2]==a[1]||a[2]+a[1]==a[0])?"YES":"NO");
		}
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		while(n-- != 0){
			int a[] = new int[3];
			    for(int i = 0; i < 3; i++){
				    a[i]=(int)Math.pow(sc.nextInt(), 2);
			}
			System.out.println((a[0]+a[1]==a[2]||a[0]+a[2]==a[1]||a[2]+a[1]==a[0])?"YES":"NO");
		}
	}
}