import java.util.Scanner;

public class Main{

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int times = sc.nextInt();
		
		for(int i = 0; i < times; i++){
			int[] nums = new int[3];
			for(int j=0; j < nums.length; j++){
				nums[j]=sc.nextInt();
			}
			if(isCRight(nums[0],nums[1],nums[2]) || isCRight(nums[1], nums[2],nums[0]) || isCRight(nums[2], nums[0],nums[1])){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		}
	}
	
	private static boolean isCRight(int a, int b, int c){
		return a*a + b*b ==c *c;
	}
} import java.util.Scanner; Scanner java.util public class Main{

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int times = sc.nextInt();
		
		for(int i = 0; i < times; i++){
			int[] nums = new int[3];
			for(int j=0; j < nums.length; j++){
				nums[j]=sc.nextInt();
			}
			if(isCRight(nums[0],nums[1],nums[2]) || isCRight(nums[1], nums[2],nums[0]) || isCRight(nums[2], nums[0],nums[1])){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		}
	}
	
	private static boolean isCRight(int a, int b, int c){
		return a*a + b*b ==c *c;
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int times = sc.nextInt();
		
		for(int i = 0; i < times; i++){
			int[] nums = new int[3];
			for(int j=0; j < nums.length; j++){
				nums[j]=sc.nextInt();
			}
			if(isCRight(nums[0],nums[1],nums[2]) || isCRight(nums[1], nums[2],nums[0]) || isCRight(nums[2], nums[0],nums[1])){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int times = sc.nextInt();
		
		for(int i = 0; i < times; i++){
			int[] nums = new int[3];
			for(int j=0; j < nums.length; j++){
				nums[j]=sc.nextInt();
			}
			if(isCRight(nums[0],nums[1],nums[2]) || isCRight(nums[1], nums[2],nums[0]) || isCRight(nums[2], nums[0],nums[1])){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int times = sc.nextInt(); times sc.nextInt() sc.nextInt sc for(int i = 0; i < times; i++){
			int[] nums = new int[3];
			for(int j=0; j < nums.length; j++){
				nums[j]=sc.nextInt();
			}
			if(isCRight(nums[0],nums[1],nums[2]) || isCRight(nums[1], nums[2],nums[0]) || isCRight(nums[2], nums[0],nums[1])){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		} int i = 0; int i = 0; i 0 i < times i times i++ i++ i {
			int[] nums = new int[3];
			for(int j=0; j < nums.length; j++){
				nums[j]=sc.nextInt();
			}
			if(isCRight(nums[0],nums[1],nums[2]) || isCRight(nums[1], nums[2],nums[0]) || isCRight(nums[2], nums[0],nums[1])){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		} {
			int[] nums = new int[3];
			for(int j=0; j < nums.length; j++){
				nums[j]=sc.nextInt();
			}
			if(isCRight(nums[0],nums[1],nums[2]) || isCRight(nums[1], nums[2],nums[0]) || isCRight(nums[2], nums[0],nums[1])){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		} int[] nums = new int[3]; nums new int[3] 3 for(int j=0; j < nums.length; j++){
				nums[j]=sc.nextInt();
			} int j=0; int j=0; j 0 j < nums.length j nums.length nums nums.length j++ j++ j {
				nums[j]=sc.nextInt();
			} {
				nums[j]=sc.nextInt();
			} nums[j]=sc.nextInt() nums[j] nums j sc.nextInt() sc.nextInt sc if(isCRight(nums[0],nums[1],nums[2]) || isCRight(nums[1], nums[2],nums[0]) || isCRight(nums[2], nums[0],nums[1])){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			} isCRight(nums[0],nums[1],nums[2]) || isCRight(nums[1], nums[2],nums[0]) || isCRight(nums[2], nums[0],nums[1]) isCRight(nums[0],nums[1],nums[2]) || isCRight(nums[1], nums[2],nums[0]) || isCRight(nums[2], nums[0],nums[1]) isCRight(nums[0],nums[1],nums[2]) isCRight nums[0] nums 0 nums[1] nums 1 nums[2] nums 2 isCRight(nums[1], nums[2],nums[0]) isCRight nums[1] nums 1 nums[2] nums 2 nums[0] nums 0 isCRight(nums[2], nums[0],nums[1]) isCRight nums[2] nums 2 nums[0] nums 0 nums[1] nums 1 {
				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" String[] args args private static boolean isCRight(int a, int b, int c){
		return a*a + b*b ==c *c;
	} isCRight {
		return a*a + b*b ==c *c;
	} return a*a + b*b ==c *c; a*a + b*b ==c *c a*a + b*b a*a a a b*b b b c *c c c int a a int b b int c c public class Main{

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int times = sc.nextInt();
		
		for(int i = 0; i < times; i++){
			int[] nums = new int[3];
			for(int j=0; j < nums.length; j++){
				nums[j]=sc.nextInt();
			}
			if(isCRight(nums[0],nums[1],nums[2]) || isCRight(nums[1], nums[2],nums[0]) || isCRight(nums[2], nums[0],nums[1])){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		}
	}
	
	private static boolean isCRight(int a, int b, int c){
		return a*a + b*b ==c *c;
	}
} public class Main{

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int times = sc.nextInt();
		
		for(int i = 0; i < times; i++){
			int[] nums = new int[3];
			for(int j=0; j < nums.length; j++){
				nums[j]=sc.nextInt();
			}
			if(isCRight(nums[0],nums[1],nums[2]) || isCRight(nums[1], nums[2],nums[0]) || isCRight(nums[2], nums[0],nums[1])){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		}
	}
	
	private static boolean isCRight(int a, int b, int c){
		return a*a + b*b ==c *c;
	}
} Main
import java.util.Scanner;

public class Main{

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int times = sc.nextInt();
		
		for(int i = 0; i < times; i++){
			int[] nums = new int[3];
			for(int j=0; j < nums.length; j++){
				nums[j]=sc.nextInt();
			}
			if(isCRight(nums[0],nums[1],nums[2]) || isCRight(nums[1], nums[2],nums[0]) || isCRight(nums[2], nums[0],nums[1])){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		}
	}
	
	private static boolean isCRight(int a, int b, int c){
		return a*a + b*b ==c *c;
	}
}