import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;

class Main {
	public static void main(String[] args) throws NumberFormatException, IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int ndata = Integer.parseInt(br.readLine());
		List<String> results = new ArrayList<String>();
		
		while (ndata > 0) {
			String line = br.readLine();
			StringTokenizer st = new StringTokenizer(line);

			int a = Integer.parseInt(st.nextToken());
			int b = Integer.parseInt(st.nextToken());
			int c = Integer.parseInt(st.nextToken());
			
			if (a*a + b*b == c*c || b*b + c*c == a*a || a*a + c*c == b*b) {
				results.add("YES");
			} else {
				results.add("NO");
			}
			
			ndata--;
		}
		
		for (String r : results) {
			System.out.println(r);
		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.StringTokenizer; StringTokenizer java.util class Main {
	public static void main(String[] args) throws NumberFormatException, IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int ndata = Integer.parseInt(br.readLine());
		List<String> results = new ArrayList<String>();
		
		while (ndata > 0) {
			String line = br.readLine();
			StringTokenizer st = new StringTokenizer(line);

			int a = Integer.parseInt(st.nextToken());
			int b = Integer.parseInt(st.nextToken());
			int c = Integer.parseInt(st.nextToken());
			
			if (a*a + b*b == c*c || b*b + c*c == a*a || a*a + c*c == b*b) {
				results.add("YES");
			} else {
				results.add("NO");
			}
			
			ndata--;
		}
		
		for (String r : results) {
			System.out.println(r);
		}
	}
} Main public static void main(String[] args) throws NumberFormatException, IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int ndata = Integer.parseInt(br.readLine());
		List<String> results = new ArrayList<String>();
		
		while (ndata > 0) {
			String line = br.readLine();
			StringTokenizer st = new StringTokenizer(line);

			int a = Integer.parseInt(st.nextToken());
			int b = Integer.parseInt(st.nextToken());
			int c = Integer.parseInt(st.nextToken());
			
			if (a*a + b*b == c*c || b*b + c*c == a*a || a*a + c*c == b*b) {
				results.add("YES");
			} else {
				results.add("NO");
			}
			
			ndata--;
		}
		
		for (String r : results) {
			System.out.println(r);
		}
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int ndata = Integer.parseInt(br.readLine());
		List<String> results = new ArrayList<String>();
		
		while (ndata > 0) {
			String line = br.readLine();
			StringTokenizer st = new StringTokenizer(line);

			int a = Integer.parseInt(st.nextToken());
			int b = Integer.parseInt(st.nextToken());
			int c = Integer.parseInt(st.nextToken());
			
			if (a*a + b*b == c*c || b*b + c*c == a*a || a*a + c*c == b*b) {
				results.add("YES");
			} else {
				results.add("NO");
			}
			
			ndata--;
		}
		
		for (String r : results) {
			System.out.println(r);
		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int ndata = Integer.parseInt(br.readLine()); ndata Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br List<String> results = new ArrayList<String>(); results new ArrayList<String>() while (ndata > 0) {
			String line = br.readLine();
			StringTokenizer st = new StringTokenizer(line);

			int a = Integer.parseInt(st.nextToken());
			int b = Integer.parseInt(st.nextToken());
			int c = Integer.parseInt(st.nextToken());
			
			if (a*a + b*b == c*c || b*b + c*c == a*a || a*a + c*c == b*b) {
				results.add("YES");
			} else {
				results.add("NO");
			}
			
			ndata--;
		} ndata > 0 ndata 0 {
			String line = br.readLine();
			StringTokenizer st = new StringTokenizer(line);

			int a = Integer.parseInt(st.nextToken());
			int b = Integer.parseInt(st.nextToken());
			int c = Integer.parseInt(st.nextToken());
			
			if (a*a + b*b == c*c || b*b + c*c == a*a || a*a + c*c == b*b) {
				results.add("YES");
			} else {
				results.add("NO");
			}
			
			ndata--;
		} String line = br.readLine(); line br.readLine() br.readLine br StringTokenizer st = new StringTokenizer(line); st new StringTokenizer(line) int a = Integer.parseInt(st.nextToken()); a Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st int b = Integer.parseInt(st.nextToken()); b Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st int c = Integer.parseInt(st.nextToken()); c Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st if (a*a + b*b == c*c || b*b + c*c == a*a || a*a + c*c == b*b) {
				results.add("YES");
			} else {
				results.add("NO");
			} a*a + b*b == c*c || b*b + c*c == a*a || a*a + c*c == b*b a*a + b*b == c*c || b*b + c*c == a*a || a*a + c*c == b*b a*a + b*b == c*c a*a + b*b a*a a a b*b b b c*c c c b*b + c*c == a*a b*b + c*c b*b b b c*c c c a*a a a a*a + c*c == b*b a*a + c*c a*a a a c*c c c b*b b b {
				results.add("YES");
			} results.add("YES") results.add results "YES" {
				results.add("NO");
			} results.add("NO") results.add results "NO" ndata-- ndata for (String r : results) {
			System.out.println(r);
		} String r results {
			System.out.println(r);
		} {
			System.out.println(r);
		} System.out.println(r) System.out.println System.out System System.out r String[] args args
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;

class Main {
	public static void main(String[] args) throws NumberFormatException, IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int ndata = Integer.parseInt(br.readLine());
		List<String> results = new ArrayList<String>();
		
		while (ndata > 0) {
			String line = br.readLine();
			StringTokenizer st = new StringTokenizer(line);

			int a = Integer.parseInt(st.nextToken());
			int b = Integer.parseInt(st.nextToken());
			int c = Integer.parseInt(st.nextToken());
			
			if (a*a + b*b == c*c || b*b + c*c == a*a || a*a + c*c == b*b) {
				results.add("YES");
			} else {
				results.add("NO");
			}
			
			ndata--;
		}
		
		for (String r : results) {
			System.out.println(r);
		}
	}
}