import java.io.*;
import java.util.*;

public class Main {
	
	public static void main(String[] args) throws IOException {
		
		BufferedReader br = 
			new BufferedReader(new InputStreamReader(System.in));
		
		ArrayList<Boolean> ans = new ArrayList<Boolean>();
		int j = 0;
		
		int cnt = Integer.parseInt(br.readLine());
		for (int i = 0; i < cnt; i++) {
			StringTokenizer st = new StringTokenizer(br.readLine()," ");
			int[] nums = new int[3];
			while (st.hasMoreTokens())
				nums[j++] = Integer.parseInt(st.nextToken());
			Arrays.sort(nums);
			ans.add(nums[0] * nums[0] + nums[1] * nums[1] == nums[2] * nums[2]);
			j = 0;
		}
		
		for (boolean a : ans)
			System.out.println(a ? "YES" : "NO");
	}
	
} import java.io.*; io.* java import java.util.*; util.* java public class Main {
	
	public static void main(String[] args) throws IOException {
		
		BufferedReader br = 
			new BufferedReader(new InputStreamReader(System.in));
		
		ArrayList<Boolean> ans = new ArrayList<Boolean>();
		int j = 0;
		
		int cnt = Integer.parseInt(br.readLine());
		for (int i = 0; i < cnt; i++) {
			StringTokenizer st = new StringTokenizer(br.readLine()," ");
			int[] nums = new int[3];
			while (st.hasMoreTokens())
				nums[j++] = Integer.parseInt(st.nextToken());
			Arrays.sort(nums);
			ans.add(nums[0] * nums[0] + nums[1] * nums[1] == nums[2] * nums[2]);
			j = 0;
		}
		
		for (boolean a : ans)
			System.out.println(a ? "YES" : "NO");
	}
	
} Main public static void main(String[] args) throws IOException {
		
		BufferedReader br = 
			new BufferedReader(new InputStreamReader(System.in));
		
		ArrayList<Boolean> ans = new ArrayList<Boolean>();
		int j = 0;
		
		int cnt = Integer.parseInt(br.readLine());
		for (int i = 0; i < cnt; i++) {
			StringTokenizer st = new StringTokenizer(br.readLine()," ");
			int[] nums = new int[3];
			while (st.hasMoreTokens())
				nums[j++] = Integer.parseInt(st.nextToken());
			Arrays.sort(nums);
			ans.add(nums[0] * nums[0] + nums[1] * nums[1] == nums[2] * nums[2]);
			j = 0;
		}
		
		for (boolean a : ans)
			System.out.println(a ? "YES" : "NO");
	} main {
		
		BufferedReader br = 
			new BufferedReader(new InputStreamReader(System.in));
		
		ArrayList<Boolean> ans = new ArrayList<Boolean>();
		int j = 0;
		
		int cnt = Integer.parseInt(br.readLine());
		for (int i = 0; i < cnt; i++) {
			StringTokenizer st = new StringTokenizer(br.readLine()," ");
			int[] nums = new int[3];
			while (st.hasMoreTokens())
				nums[j++] = Integer.parseInt(st.nextToken());
			Arrays.sort(nums);
			ans.add(nums[0] * nums[0] + nums[1] * nums[1] == nums[2] * nums[2]);
			j = 0;
		}
		
		for (boolean a : ans)
			System.out.println(a ? "YES" : "NO");
	} BufferedReader br = 
			new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) ArrayList<Boolean> ans = new ArrayList<Boolean>(); ans new ArrayList<Boolean>() int j = 0; j 0 int cnt = Integer.parseInt(br.readLine()); cnt Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br for (int i = 0; i < cnt; i++) {
			StringTokenizer st = new StringTokenizer(br.readLine()," ");
			int[] nums = new int[3];
			while (st.hasMoreTokens())
				nums[j++] = Integer.parseInt(st.nextToken());
			Arrays.sort(nums);
			ans.add(nums[0] * nums[0] + nums[1] * nums[1] == nums[2] * nums[2]);
			j = 0;
		} int i = 0; int i = 0; i 0 i < cnt i cnt i++ i++ i {
			StringTokenizer st = new StringTokenizer(br.readLine()," ");
			int[] nums = new int[3];
			while (st.hasMoreTokens())
				nums[j++] = Integer.parseInt(st.nextToken());
			Arrays.sort(nums);
			ans.add(nums[0] * nums[0] + nums[1] * nums[1] == nums[2] * nums[2]);
			j = 0;
		} {
			StringTokenizer st = new StringTokenizer(br.readLine()," ");
			int[] nums = new int[3];
			while (st.hasMoreTokens())
				nums[j++] = Integer.parseInt(st.nextToken());
			Arrays.sort(nums);
			ans.add(nums[0] * nums[0] + nums[1] * nums[1] == nums[2] * nums[2]);
			j = 0;
		} StringTokenizer st = new StringTokenizer(br.readLine()," "); st new StringTokenizer(br.readLine()," ") int[] nums = new int[3]; nums new int[3] 3 while (st.hasMoreTokens())
				nums[j++] = Integer.parseInt(st.nextToken()); st.hasMoreTokens() st.hasMoreTokens st nums[j++] = Integer.parseInt(st.nextToken()) nums[j++] nums j++ j Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st Arrays.sort(nums) Arrays.sort Arrays nums ans.add(nums[0] * nums[0] + nums[1] * nums[1] == nums[2] * nums[2]) ans.add ans nums[0] * nums[0] + nums[1] * nums[1] == nums[2] * nums[2] nums[0] * nums[0] + nums[1] * nums[1] nums[0] * nums[0] nums[0] nums 0 nums[0] nums 0 nums[1] * nums[1] nums[1] nums 1 nums[1] nums 1 nums[2] * nums[2] nums[2] nums 2 nums[2] nums 2 j = 0 j 0 for (boolean a : ans)
			System.out.println(a ? "YES" : "NO"); boolean a ans System.out.println(a ? "YES" : "NO"); System.out.println(a ? "YES" : "NO") System.out.println System.out System System.out a ? "YES" : "NO" a "YES" "NO" String[] args args public class Main {
	
	public static void main(String[] args) throws IOException {
		
		BufferedReader br = 
			new BufferedReader(new InputStreamReader(System.in));
		
		ArrayList<Boolean> ans = new ArrayList<Boolean>();
		int j = 0;
		
		int cnt = Integer.parseInt(br.readLine());
		for (int i = 0; i < cnt; i++) {
			StringTokenizer st = new StringTokenizer(br.readLine()," ");
			int[] nums = new int[3];
			while (st.hasMoreTokens())
				nums[j++] = Integer.parseInt(st.nextToken());
			Arrays.sort(nums);
			ans.add(nums[0] * nums[0] + nums[1] * nums[1] == nums[2] * nums[2]);
			j = 0;
		}
		
		for (boolean a : ans)
			System.out.println(a ? "YES" : "NO");
	}
	
} public class Main {
	
	public static void main(String[] args) throws IOException {
		
		BufferedReader br = 
			new BufferedReader(new InputStreamReader(System.in));
		
		ArrayList<Boolean> ans = new ArrayList<Boolean>();
		int j = 0;
		
		int cnt = Integer.parseInt(br.readLine());
		for (int i = 0; i < cnt; i++) {
			StringTokenizer st = new StringTokenizer(br.readLine()," ");
			int[] nums = new int[3];
			while (st.hasMoreTokens())
				nums[j++] = Integer.parseInt(st.nextToken());
			Arrays.sort(nums);
			ans.add(nums[0] * nums[0] + nums[1] * nums[1] == nums[2] * nums[2]);
			j = 0;
		}
		
		for (boolean a : ans)
			System.out.println(a ? "YES" : "NO");
	}
	
} Main
import java.io.*;
import java.util.*;

public class Main {
	
	public static void main(String[] args) throws IOException {
		
		BufferedReader br = 
			new BufferedReader(new InputStreamReader(System.in));
		
		ArrayList<Boolean> ans = new ArrayList<Boolean>();
		int j = 0;
		
		int cnt = Integer.parseInt(br.readLine());
		for (int i = 0; i < cnt; i++) {
			StringTokenizer st = new StringTokenizer(br.readLine()," ");
			int[] nums = new int[3];
			while (st.hasMoreTokens())
				nums[j++] = Integer.parseInt(st.nextToken());
			Arrays.sort(nums);
			ans.add(nums[0] * nums[0] + nums[1] * nums[1] == nums[2] * nums[2]);
			j = 0;
		}
		
		for (boolean a : ans)
			System.out.println(a ? "YES" : "NO");
	}
	
}