import java.util.Scanner;
public class Main{

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		boolean yes = false;
		for(int i = 0;i<n;i++){
			yes = false;
			int x = sc.nextInt();
			int y = sc.nextInt();
			int z = sc.nextInt();
			if(((x*x)+(y*y))==(z*z)) yes = true;
			else if(((z*z)+(y*y))==(x*x)) yes = true;
			else if(((x*x)+(z*z))==(y*y)) yes = true;
			
			if(yes) System.out.println("YES");
			else System.out.println("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();
		boolean yes = false;
		for(int i = 0;i<n;i++){
			yes = false;
			int x = sc.nextInt();
			int y = sc.nextInt();
			int z = sc.nextInt();
			if(((x*x)+(y*y))==(z*z)) yes = true;
			else if(((z*z)+(y*y))==(x*x)) yes = true;
			else if(((x*x)+(z*z))==(y*y)) yes = true;
			
			if(yes) System.out.println("YES");
			else System.out.println("NO");
		}
 	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		boolean yes = false;
		for(int i = 0;i<n;i++){
			yes = false;
			int x = sc.nextInt();
			int y = sc.nextInt();
			int z = sc.nextInt();
			if(((x*x)+(y*y))==(z*z)) yes = true;
			else if(((z*z)+(y*y))==(x*x)) yes = true;
			else if(((x*x)+(z*z))==(y*y)) yes = true;
			
			if(yes) System.out.println("YES");
			else System.out.println("NO");
		}
 	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		boolean yes = false;
		for(int i = 0;i<n;i++){
			yes = false;
			int x = sc.nextInt();
			int y = sc.nextInt();
			int z = sc.nextInt();
			if(((x*x)+(y*y))==(z*z)) yes = true;
			else if(((z*z)+(y*y))==(x*x)) yes = true;
			else if(((x*x)+(z*z))==(y*y)) yes = true;
			
			if(yes) System.out.println("YES");
			else System.out.println("NO");
		}
 	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc boolean yes = false; yes false for(int i = 0;i<n;i++){
			yes = false;
			int x = sc.nextInt();
			int y = sc.nextInt();
			int z = sc.nextInt();
			if(((x*x)+(y*y))==(z*z)) yes = true;
			else if(((z*z)+(y*y))==(x*x)) yes = true;
			else if(((x*x)+(z*z))==(y*y)) yes = true;
			
			if(yes) System.out.println("YES");
			else System.out.println("NO");
		} int i = 0; int i = 0; i 0 i<n i n i++ i++ i {
			yes = false;
			int x = sc.nextInt();
			int y = sc.nextInt();
			int z = sc.nextInt();
			if(((x*x)+(y*y))==(z*z)) yes = true;
			else if(((z*z)+(y*y))==(x*x)) yes = true;
			else if(((x*x)+(z*z))==(y*y)) yes = true;
			
			if(yes) System.out.println("YES");
			else System.out.println("NO");
		} {
			yes = false;
			int x = sc.nextInt();
			int y = sc.nextInt();
			int z = sc.nextInt();
			if(((x*x)+(y*y))==(z*z)) yes = true;
			else if(((z*z)+(y*y))==(x*x)) yes = true;
			else if(((x*x)+(z*z))==(y*y)) yes = true;
			
			if(yes) System.out.println("YES");
			else System.out.println("NO");
		} yes = false yes false int x = sc.nextInt(); x sc.nextInt() sc.nextInt sc int y = sc.nextInt(); y sc.nextInt() sc.nextInt sc int z = sc.nextInt(); z sc.nextInt() sc.nextInt sc if(((x*x)+(y*y))==(z*z)) yes = true;
			else if(((z*z)+(y*y))==(x*x)) yes = true;
			else if(((x*x)+(z*z))==(y*y)) yes = true; ((x*x)+(y*y))==(z*z) ((x*x)+(y*y)) (x*x) x x (y*y) y y (z*z) z z yes = true yes true if(((z*z)+(y*y))==(x*x)) yes = true;
			else if(((x*x)+(z*z))==(y*y)) yes = true; ((z*z)+(y*y))==(x*x) ((z*z)+(y*y)) (z*z) z z (y*y) y y (x*x) x x yes = true yes true if(((x*x)+(z*z))==(y*y)) yes = true; ((x*x)+(z*z))==(y*y) ((x*x)+(z*z)) (x*x) x x (z*z) z z (y*y) y y yes = true yes true if(yes) System.out.println("YES");
			else System.out.println("NO"); yes System.out.println("YES") System.out.println System.out System System.out "YES" System.out.println("NO") System.out.println System.out System System.out "NO" String[] args args public class Main{

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		boolean yes = false;
		for(int i = 0;i<n;i++){
			yes = false;
			int x = sc.nextInt();
			int y = sc.nextInt();
			int z = sc.nextInt();
			if(((x*x)+(y*y))==(z*z)) yes = true;
			else if(((z*z)+(y*y))==(x*x)) yes = true;
			else if(((x*x)+(z*z))==(y*y)) yes = true;
			
			if(yes) System.out.println("YES");
			else System.out.println("NO");
		}
 	}

} public class Main{

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		boolean yes = false;
		for(int i = 0;i<n;i++){
			yes = false;
			int x = sc.nextInt();
			int y = sc.nextInt();
			int z = sc.nextInt();
			if(((x*x)+(y*y))==(z*z)) yes = true;
			else if(((z*z)+(y*y))==(x*x)) yes = true;
			else if(((x*x)+(z*z))==(y*y)) yes = true;
			
			if(yes) System.out.println("YES");
			else System.out.println("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();
		boolean yes = false;
		for(int i = 0;i<n;i++){
			yes = false;
			int x = sc.nextInt();
			int y = sc.nextInt();
			int z = sc.nextInt();
			if(((x*x)+(y*y))==(z*z)) yes = true;
			else if(((z*z)+(y*y))==(x*x)) yes = true;
			else if(((x*x)+(z*z))==(y*y)) yes = true;
			
			if(yes) System.out.println("YES");
			else System.out.println("NO");
		}
 	}

}