import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Main {
	private StringTokenizer st;
	private BufferedReader bf;
	private int w;
	
	Main() {
		readData();
		

	}	

	private void readData() {
		try {
			bf = new BufferedReader(new InputStreamReader(System.in));
			st = new StringTokenizer(bf.readLine());
			
			int n = nextInt();
			int[] a;
			for (int i = 0;i < n ; i++) {
				a = new int[3];
				a[0] = nextInt();
				a[1] = nextInt();
				a[2] = nextInt();
				Arrays.sort(a);
				
//				for(int k: a)
//					System.out.println(k);
					
				if ((a[0]*a[0]+a[1]*a[1])==a[2]*a[2])
					System.out.println("YES");
				else
					System.out.println("NO");
			}
			
			
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	private int nextInt() throws IOException {
		return Integer.parseInt(next());
	}
	
	
	private String next() throws IOException {
		if (st == null || !st.hasMoreTokens())
			st = new StringTokenizer(bf.readLine());
		return st.nextToken();
	}
	
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Main m = new Main();
	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Arrays; Arrays java.util import java.util.StringTokenizer; StringTokenizer java.util public class Main {
	private StringTokenizer st;
	private BufferedReader bf;
	private int w;
	
	Main() {
		readData();
		

	}	

	private void readData() {
		try {
			bf = new BufferedReader(new InputStreamReader(System.in));
			st = new StringTokenizer(bf.readLine());
			
			int n = nextInt();
			int[] a;
			for (int i = 0;i < n ; i++) {
				a = new int[3];
				a[0] = nextInt();
				a[1] = nextInt();
				a[2] = nextInt();
				Arrays.sort(a);
				
//				for(int k: a)
//					System.out.println(k);
					
				if ((a[0]*a[0]+a[1]*a[1])==a[2]*a[2])
					System.out.println("YES");
				else
					System.out.println("NO");
			}
			
			
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	private int nextInt() throws IOException {
		return Integer.parseInt(next());
	}
	
	
	private String next() throws IOException {
		if (st == null || !st.hasMoreTokens())
			st = new StringTokenizer(bf.readLine());
		return st.nextToken();
	}
	
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Main m = new Main();
	}

} Main private StringTokenizer st; st private BufferedReader bf; bf private int w; w Main() {
		readData();
		

	} Main {
		readData();
		

	} readData() readData private void readData() {
		try {
			bf = new BufferedReader(new InputStreamReader(System.in));
			st = new StringTokenizer(bf.readLine());
			
			int n = nextInt();
			int[] a;
			for (int i = 0;i < n ; i++) {
				a = new int[3];
				a[0] = nextInt();
				a[1] = nextInt();
				a[2] = nextInt();
				Arrays.sort(a);
				
//				for(int k: a)
//					System.out.println(k);
					
				if ((a[0]*a[0]+a[1]*a[1])==a[2]*a[2])
					System.out.println("YES");
				else
					System.out.println("NO");
			}
			
			
		} catch (Exception e) {
			e.printStackTrace();
		}
	} readData {
		try {
			bf = new BufferedReader(new InputStreamReader(System.in));
			st = new StringTokenizer(bf.readLine());
			
			int n = nextInt();
			int[] a;
			for (int i = 0;i < n ; i++) {
				a = new int[3];
				a[0] = nextInt();
				a[1] = nextInt();
				a[2] = nextInt();
				Arrays.sort(a);
				
//				for(int k: a)
//					System.out.println(k);
					
				if ((a[0]*a[0]+a[1]*a[1])==a[2]*a[2])
					System.out.println("YES");
				else
					System.out.println("NO");
			}
			
			
		} catch (Exception e) {
			e.printStackTrace();
		}
	} try {
			bf = new BufferedReader(new InputStreamReader(System.in));
			st = new StringTokenizer(bf.readLine());
			
			int n = nextInt();
			int[] a;
			for (int i = 0;i < n ; i++) {
				a = new int[3];
				a[0] = nextInt();
				a[1] = nextInt();
				a[2] = nextInt();
				Arrays.sort(a);
				
//				for(int k: a)
//					System.out.println(k);
					
				if ((a[0]*a[0]+a[1]*a[1])==a[2]*a[2])
					System.out.println("YES");
				else
					System.out.println("NO");
			}
			
			
		} catch (Exception e) {
			e.printStackTrace();
		} catch (Exception e) {
			e.printStackTrace();
		} Exception e {
			e.printStackTrace();
		} e.printStackTrace() e.printStackTrace e {
			bf = new BufferedReader(new InputStreamReader(System.in));
			st = new StringTokenizer(bf.readLine());
			
			int n = nextInt();
			int[] a;
			for (int i = 0;i < n ; i++) {
				a = new int[3];
				a[0] = nextInt();
				a[1] = nextInt();
				a[2] = nextInt();
				Arrays.sort(a);
				
//				for(int k: a)
//					System.out.println(k);
					
				if ((a[0]*a[0]+a[1]*a[1])==a[2]*a[2])
					System.out.println("YES");
				else
					System.out.println("NO");
			}
			
			
		} bf = new BufferedReader(new InputStreamReader(System.in)) bf new BufferedReader(new InputStreamReader(System.in)) st = new StringTokenizer(bf.readLine()) st new StringTokenizer(bf.readLine()) int n = nextInt(); n nextInt() nextInt int[] a; a for (int i = 0;i < n ; i++) {
				a = new int[3];
				a[0] = nextInt();
				a[1] = nextInt();
				a[2] = nextInt();
				Arrays.sort(a);
				
//				for(int k: a)
//					System.out.println(k);
					
				if ((a[0]*a[0]+a[1]*a[1])==a[2]*a[2])
					System.out.println("YES");
				else
					System.out.println("NO");
			} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
				a = new int[3];
				a[0] = nextInt();
				a[1] = nextInt();
				a[2] = nextInt();
				Arrays.sort(a);
				
//				for(int k: a)
//					System.out.println(k);
					
				if ((a[0]*a[0]+a[1]*a[1])==a[2]*a[2])
					System.out.println("YES");
				else
					System.out.println("NO");
			} {
				a = new int[3];
				a[0] = nextInt();
				a[1] = nextInt();
				a[2] = nextInt();
				Arrays.sort(a);
				
//				for(int k: a)
//					System.out.println(k);
					
				if ((a[0]*a[0]+a[1]*a[1])==a[2]*a[2])
					System.out.println("YES");
				else
					System.out.println("NO");
			} a = new int[3] a new int[3] 3 a[0] = nextInt() a[0] a 0 nextInt() nextInt a[1] = nextInt() a[1] a 1 nextInt() nextInt a[2] = nextInt() a[2] a 2 nextInt() nextInt Arrays.sort(a) Arrays.sort Arrays a if ((a[0]*a[0]+a[1]*a[1])==a[2]*a[2])
					System.out.println("YES");
				else
					System.out.println("NO"); (a[0]*a[0]+a[1]*a[1])==a[2]*a[2] (a[0]*a[0]+a[1]*a[1]) a[0]*a[0] a[0] a 0 a[0] a 0 a[1]*a[1] a[1] a 1 a[1] a 1 a[2]*a[2] a[2] a 2 a[2] a 2 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" private int nextInt() throws IOException {
		return Integer.parseInt(next());
	} nextInt {
		return Integer.parseInt(next());
	} return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next private String next() throws IOException {
		if (st == null || !st.hasMoreTokens())
			st = new StringTokenizer(bf.readLine());
		return st.nextToken();
	} next {
		if (st == null || !st.hasMoreTokens())
			st = new StringTokenizer(bf.readLine());
		return st.nextToken();
	} if (st == null || !st.hasMoreTokens())
			st = new StringTokenizer(bf.readLine()); st == null || !st.hasMoreTokens() st == null st null !st.hasMoreTokens() st.hasMoreTokens() st.hasMoreTokens st st = new StringTokenizer(bf.readLine()) st new StringTokenizer(bf.readLine()) return st.nextToken(); st.nextToken() st.nextToken st public static void main(String[] args) {
		// TODO Auto-generated method stub
		Main m = new Main();
	} main {
		// TODO Auto-generated method stub
		Main m = new Main();
	} Main m = new Main(); m new Main() String[] args args public class Main {
	private StringTokenizer st;
	private BufferedReader bf;
	private int w;
	
	Main() {
		readData();
		

	}	

	private void readData() {
		try {
			bf = new BufferedReader(new InputStreamReader(System.in));
			st = new StringTokenizer(bf.readLine());
			
			int n = nextInt();
			int[] a;
			for (int i = 0;i < n ; i++) {
				a = new int[3];
				a[0] = nextInt();
				a[1] = nextInt();
				a[2] = nextInt();
				Arrays.sort(a);
				
//				for(int k: a)
//					System.out.println(k);
					
				if ((a[0]*a[0]+a[1]*a[1])==a[2]*a[2])
					System.out.println("YES");
				else
					System.out.println("NO");
			}
			
			
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	private int nextInt() throws IOException {
		return Integer.parseInt(next());
	}
	
	
	private String next() throws IOException {
		if (st == null || !st.hasMoreTokens())
			st = new StringTokenizer(bf.readLine());
		return st.nextToken();
	}
	
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Main m = new Main();
	}

} public class Main {
	private StringTokenizer st;
	private BufferedReader bf;
	private int w;
	
	Main() {
		readData();
		

	}	

	private void readData() {
		try {
			bf = new BufferedReader(new InputStreamReader(System.in));
			st = new StringTokenizer(bf.readLine());
			
			int n = nextInt();
			int[] a;
			for (int i = 0;i < n ; i++) {
				a = new int[3];
				a[0] = nextInt();
				a[1] = nextInt();
				a[2] = nextInt();
				Arrays.sort(a);
				
//				for(int k: a)
//					System.out.println(k);
					
				if ((a[0]*a[0]+a[1]*a[1])==a[2]*a[2])
					System.out.println("YES");
				else
					System.out.println("NO");
			}
			
			
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	private int nextInt() throws IOException {
		return Integer.parseInt(next());
	}
	
	
	private String next() throws IOException {
		if (st == null || !st.hasMoreTokens())
			st = new StringTokenizer(bf.readLine());
		return st.nextToken();
	}
	
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Main m = new Main();
	}

} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Main {
	private StringTokenizer st;
	private BufferedReader bf;
	private int w;
	
	Main() {
		readData();
		

	}	

	private void readData() {
		try {
			bf = new BufferedReader(new InputStreamReader(System.in));
			st = new StringTokenizer(bf.readLine());
			
			int n = nextInt();
			int[] a;
			for (int i = 0;i < n ; i++) {
				a = new int[3];
				a[0] = nextInt();
				a[1] = nextInt();
				a[2] = nextInt();
				Arrays.sort(a);
				
//				for(int k: a)
//					System.out.println(k);
					
				if ((a[0]*a[0]+a[1]*a[1])==a[2]*a[2])
					System.out.println("YES");
				else
					System.out.println("NO");
			}
			
			
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	private int nextInt() throws IOException {
		return Integer.parseInt(next());
	}
	
	
	private String next() throws IOException {
		if (st == null || !st.hasMoreTokens())
			st = new StringTokenizer(bf.readLine());
		return st.nextToken();
	}
	
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Main m = new Main();
	}

}