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


public class Main {
	
    public static void main(String[] a){
    	
    	BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
		String line;
		int numDS = -1;
		int aSide = -1;
		int bSide = -1;
		int cSide = -1;
		
		ArrayList <String> results = new ArrayList<String>();
		
		//get number of data sets
    	try {
			while ((line = stdin.readLine()) != null && 
					line.length()!= 0) {
				
				String[] checker = line.split(" ");
				
				if (checker.length == 1){
					numDS = Integer.parseInt(checker[0]);
				} else if (checker.length == 3){
				
					int temp1 = Integer.parseInt(checker[0]);
					int temp2 = Integer.parseInt(checker[1]);
					int temp3 = Integer.parseInt(checker[2]);
					
					if (temp1 < 1 || temp1 >1000 ||
						temp2 < 1 || temp2 >1000 ||
						temp3 < 1 || temp3 >1000){
						results.add("NO");
					} else {
						//get the highest number and place to cSide
						if (temp1 > temp2 && temp1> temp3){
							cSide = temp1;
							aSide = temp2;
							bSide = temp3;
						} else if (temp2 > temp1 && temp2 > temp3){
							cSide = temp2;
							aSide = temp1;
							bSide = temp3;
						} else {
							cSide = temp3;
							aSide = temp2;
							bSide = temp1;
						}
						
						//Pythagorean
						if ((cSide*cSide) == ((aSide*aSide)+(bSide*bSide))){
							results.add("YES");
						} else {
							results.add("NO");
						}
						
						if (results.size() == numDS){
							break;
						}
					}
				}
			}

			//print result
			for (String s: results){
				System.out.println(s);
			}
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			//e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			//e.printStackTrace();
		}
    }
} 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 public class Main {
	
    public static void main(String[] a){
    	
    	BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
		String line;
		int numDS = -1;
		int aSide = -1;
		int bSide = -1;
		int cSide = -1;
		
		ArrayList <String> results = new ArrayList<String>();
		
		//get number of data sets
    	try {
			while ((line = stdin.readLine()) != null && 
					line.length()!= 0) {
				
				String[] checker = line.split(" ");
				
				if (checker.length == 1){
					numDS = Integer.parseInt(checker[0]);
				} else if (checker.length == 3){
				
					int temp1 = Integer.parseInt(checker[0]);
					int temp2 = Integer.parseInt(checker[1]);
					int temp3 = Integer.parseInt(checker[2]);
					
					if (temp1 < 1 || temp1 >1000 ||
						temp2 < 1 || temp2 >1000 ||
						temp3 < 1 || temp3 >1000){
						results.add("NO");
					} else {
						//get the highest number and place to cSide
						if (temp1 > temp2 && temp1> temp3){
							cSide = temp1;
							aSide = temp2;
							bSide = temp3;
						} else if (temp2 > temp1 && temp2 > temp3){
							cSide = temp2;
							aSide = temp1;
							bSide = temp3;
						} else {
							cSide = temp3;
							aSide = temp2;
							bSide = temp1;
						}
						
						//Pythagorean
						if ((cSide*cSide) == ((aSide*aSide)+(bSide*bSide))){
							results.add("YES");
						} else {
							results.add("NO");
						}
						
						if (results.size() == numDS){
							break;
						}
					}
				}
			}

			//print result
			for (String s: results){
				System.out.println(s);
			}
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			//e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			//e.printStackTrace();
		}
    }
} Main public static void main(String[] a){
    	
    	BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
		String line;
		int numDS = -1;
		int aSide = -1;
		int bSide = -1;
		int cSide = -1;
		
		ArrayList <String> results = new ArrayList<String>();
		
		//get number of data sets
    	try {
			while ((line = stdin.readLine()) != null && 
					line.length()!= 0) {
				
				String[] checker = line.split(" ");
				
				if (checker.length == 1){
					numDS = Integer.parseInt(checker[0]);
				} else if (checker.length == 3){
				
					int temp1 = Integer.parseInt(checker[0]);
					int temp2 = Integer.parseInt(checker[1]);
					int temp3 = Integer.parseInt(checker[2]);
					
					if (temp1 < 1 || temp1 >1000 ||
						temp2 < 1 || temp2 >1000 ||
						temp3 < 1 || temp3 >1000){
						results.add("NO");
					} else {
						//get the highest number and place to cSide
						if (temp1 > temp2 && temp1> temp3){
							cSide = temp1;
							aSide = temp2;
							bSide = temp3;
						} else if (temp2 > temp1 && temp2 > temp3){
							cSide = temp2;
							aSide = temp1;
							bSide = temp3;
						} else {
							cSide = temp3;
							aSide = temp2;
							bSide = temp1;
						}
						
						//Pythagorean
						if ((cSide*cSide) == ((aSide*aSide)+(bSide*bSide))){
							results.add("YES");
						} else {
							results.add("NO");
						}
						
						if (results.size() == numDS){
							break;
						}
					}
				}
			}

			//print result
			for (String s: results){
				System.out.println(s);
			}
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			//e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			//e.printStackTrace();
		}
    } main {
    	
    	BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
		String line;
		int numDS = -1;
		int aSide = -1;
		int bSide = -1;
		int cSide = -1;
		
		ArrayList <String> results = new ArrayList<String>();
		
		//get number of data sets
    	try {
			while ((line = stdin.readLine()) != null && 
					line.length()!= 0) {
				
				String[] checker = line.split(" ");
				
				if (checker.length == 1){
					numDS = Integer.parseInt(checker[0]);
				} else if (checker.length == 3){
				
					int temp1 = Integer.parseInt(checker[0]);
					int temp2 = Integer.parseInt(checker[1]);
					int temp3 = Integer.parseInt(checker[2]);
					
					if (temp1 < 1 || temp1 >1000 ||
						temp2 < 1 || temp2 >1000 ||
						temp3 < 1 || temp3 >1000){
						results.add("NO");
					} else {
						//get the highest number and place to cSide
						if (temp1 > temp2 && temp1> temp3){
							cSide = temp1;
							aSide = temp2;
							bSide = temp3;
						} else if (temp2 > temp1 && temp2 > temp3){
							cSide = temp2;
							aSide = temp1;
							bSide = temp3;
						} else {
							cSide = temp3;
							aSide = temp2;
							bSide = temp1;
						}
						
						//Pythagorean
						if ((cSide*cSide) == ((aSide*aSide)+(bSide*bSide))){
							results.add("YES");
						} else {
							results.add("NO");
						}
						
						if (results.size() == numDS){
							break;
						}
					}
				}
			}

			//print result
			for (String s: results){
				System.out.println(s);
			}
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			//e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			//e.printStackTrace();
		}
    } BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in)); stdin new BufferedReader(new InputStreamReader(System.in)) String line; line int numDS = -1; numDS -1 1 int aSide = -1; aSide -1 1 int bSide = -1; bSide -1 1 int cSide = -1; cSide -1 1 ArrayList <String> results = new ArrayList<String>(); results new ArrayList<String>() try {
			while ((line = stdin.readLine()) != null && 
					line.length()!= 0) {
				
				String[] checker = line.split(" ");
				
				if (checker.length == 1){
					numDS = Integer.parseInt(checker[0]);
				} else if (checker.length == 3){
				
					int temp1 = Integer.parseInt(checker[0]);
					int temp2 = Integer.parseInt(checker[1]);
					int temp3 = Integer.parseInt(checker[2]);
					
					if (temp1 < 1 || temp1 >1000 ||
						temp2 < 1 || temp2 >1000 ||
						temp3 < 1 || temp3 >1000){
						results.add("NO");
					} else {
						//get the highest number and place to cSide
						if (temp1 > temp2 && temp1> temp3){
							cSide = temp1;
							aSide = temp2;
							bSide = temp3;
						} else if (temp2 > temp1 && temp2 > temp3){
							cSide = temp2;
							aSide = temp1;
							bSide = temp3;
						} else {
							cSide = temp3;
							aSide = temp2;
							bSide = temp1;
						}
						
						//Pythagorean
						if ((cSide*cSide) == ((aSide*aSide)+(bSide*bSide))){
							results.add("YES");
						} else {
							results.add("NO");
						}
						
						if (results.size() == numDS){
							break;
						}
					}
				}
			}

			//print result
			for (String s: results){
				System.out.println(s);
			}
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			//e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			//e.printStackTrace();
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			//e.printStackTrace();
		} NumberFormatException e {
			// TODO Auto-generated catch block
			//e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			//e.printStackTrace();
		} IOException e {
			// TODO Auto-generated catch block
			//e.printStackTrace();
		} {
			while ((line = stdin.readLine()) != null && 
					line.length()!= 0) {
				
				String[] checker = line.split(" ");
				
				if (checker.length == 1){
					numDS = Integer.parseInt(checker[0]);
				} else if (checker.length == 3){
				
					int temp1 = Integer.parseInt(checker[0]);
					int temp2 = Integer.parseInt(checker[1]);
					int temp3 = Integer.parseInt(checker[2]);
					
					if (temp1 < 1 || temp1 >1000 ||
						temp2 < 1 || temp2 >1000 ||
						temp3 < 1 || temp3 >1000){
						results.add("NO");
					} else {
						//get the highest number and place to cSide
						if (temp1 > temp2 && temp1> temp3){
							cSide = temp1;
							aSide = temp2;
							bSide = temp3;
						} else if (temp2 > temp1 && temp2 > temp3){
							cSide = temp2;
							aSide = temp1;
							bSide = temp3;
						} else {
							cSide = temp3;
							aSide = temp2;
							bSide = temp1;
						}
						
						//Pythagorean
						if ((cSide*cSide) == ((aSide*aSide)+(bSide*bSide))){
							results.add("YES");
						} else {
							results.add("NO");
						}
						
						if (results.size() == numDS){
							break;
						}
					}
				}
			}

			//print result
			for (String s: results){
				System.out.println(s);
			}
		} while ((line = stdin.readLine()) != null && 
					line.length()!= 0) {
				
				String[] checker = line.split(" ");
				
				if (checker.length == 1){
					numDS = Integer.parseInt(checker[0]);
				} else if (checker.length == 3){
				
					int temp1 = Integer.parseInt(checker[0]);
					int temp2 = Integer.parseInt(checker[1]);
					int temp3 = Integer.parseInt(checker[2]);
					
					if (temp1 < 1 || temp1 >1000 ||
						temp2 < 1 || temp2 >1000 ||
						temp3 < 1 || temp3 >1000){
						results.add("NO");
					} else {
						//get the highest number and place to cSide
						if (temp1 > temp2 && temp1> temp3){
							cSide = temp1;
							aSide = temp2;
							bSide = temp3;
						} else if (temp2 > temp1 && temp2 > temp3){
							cSide = temp2;
							aSide = temp1;
							bSide = temp3;
						} else {
							cSide = temp3;
							aSide = temp2;
							bSide = temp1;
						}
						
						//Pythagorean
						if ((cSide*cSide) == ((aSide*aSide)+(bSide*bSide))){
							results.add("YES");
						} else {
							results.add("NO");
						}
						
						if (results.size() == numDS){
							break;
						}
					}
				}
			} (line = stdin.readLine()) != null && 
					line.length()!= 0 (line = stdin.readLine()) != null (line = stdin.readLine()) line stdin.readLine() stdin.readLine stdin null line.length()!= 0 line.length() line.length line 0 {
				
				String[] checker = line.split(" ");
				
				if (checker.length == 1){
					numDS = Integer.parseInt(checker[0]);
				} else if (checker.length == 3){
				
					int temp1 = Integer.parseInt(checker[0]);
					int temp2 = Integer.parseInt(checker[1]);
					int temp3 = Integer.parseInt(checker[2]);
					
					if (temp1 < 1 || temp1 >1000 ||
						temp2 < 1 || temp2 >1000 ||
						temp3 < 1 || temp3 >1000){
						results.add("NO");
					} else {
						//get the highest number and place to cSide
						if (temp1 > temp2 && temp1> temp3){
							cSide = temp1;
							aSide = temp2;
							bSide = temp3;
						} else if (temp2 > temp1 && temp2 > temp3){
							cSide = temp2;
							aSide = temp1;
							bSide = temp3;
						} else {
							cSide = temp3;
							aSide = temp2;
							bSide = temp1;
						}
						
						//Pythagorean
						if ((cSide*cSide) == ((aSide*aSide)+(bSide*bSide))){
							results.add("YES");
						} else {
							results.add("NO");
						}
						
						if (results.size() == numDS){
							break;
						}
					}
				}
			} String[] checker = line.split(" "); checker line.split(" ") line.split line " " if (checker.length == 1){
					numDS = Integer.parseInt(checker[0]);
				} else if (checker.length == 3){
				
					int temp1 = Integer.parseInt(checker[0]);
					int temp2 = Integer.parseInt(checker[1]);
					int temp3 = Integer.parseInt(checker[2]);
					
					if (temp1 < 1 || temp1 >1000 ||
						temp2 < 1 || temp2 >1000 ||
						temp3 < 1 || temp3 >1000){
						results.add("NO");
					} else {
						//get the highest number and place to cSide
						if (temp1 > temp2 && temp1> temp3){
							cSide = temp1;
							aSide = temp2;
							bSide = temp3;
						} else if (temp2 > temp1 && temp2 > temp3){
							cSide = temp2;
							aSide = temp1;
							bSide = temp3;
						} else {
							cSide = temp3;
							aSide = temp2;
							bSide = temp1;
						}
						
						//Pythagorean
						if ((cSide*cSide) == ((aSide*aSide)+(bSide*bSide))){
							results.add("YES");
						} else {
							results.add("NO");
						}
						
						if (results.size() == numDS){
							break;
						}
					}
				} checker.length == 1 checker.length checker checker.length 1 {
					numDS = Integer.parseInt(checker[0]);
				} numDS = Integer.parseInt(checker[0]) numDS Integer.parseInt(checker[0]) Integer.parseInt Integer checker[0] checker 0 if (checker.length == 3){
				
					int temp1 = Integer.parseInt(checker[0]);
					int temp2 = Integer.parseInt(checker[1]);
					int temp3 = Integer.parseInt(checker[2]);
					
					if (temp1 < 1 || temp1 >1000 ||
						temp2 < 1 || temp2 >1000 ||
						temp3 < 1 || temp3 >1000){
						results.add("NO");
					} else {
						//get the highest number and place to cSide
						if (temp1 > temp2 && temp1> temp3){
							cSide = temp1;
							aSide = temp2;
							bSide = temp3;
						} else if (temp2 > temp1 && temp2 > temp3){
							cSide = temp2;
							aSide = temp1;
							bSide = temp3;
						} else {
							cSide = temp3;
							aSide = temp2;
							bSide = temp1;
						}
						
						//Pythagorean
						if ((cSide*cSide) == ((aSide*aSide)+(bSide*bSide))){
							results.add("YES");
						} else {
							results.add("NO");
						}
						
						if (results.size() == numDS){
							break;
						}
					}
				} checker.length == 3 checker.length checker checker.length 3 {
				
					int temp1 = Integer.parseInt(checker[0]);
					int temp2 = Integer.parseInt(checker[1]);
					int temp3 = Integer.parseInt(checker[2]);
					
					if (temp1 < 1 || temp1 >1000 ||
						temp2 < 1 || temp2 >1000 ||
						temp3 < 1 || temp3 >1000){
						results.add("NO");
					} else {
						//get the highest number and place to cSide
						if (temp1 > temp2 && temp1> temp3){
							cSide = temp1;
							aSide = temp2;
							bSide = temp3;
						} else if (temp2 > temp1 && temp2 > temp3){
							cSide = temp2;
							aSide = temp1;
							bSide = temp3;
						} else {
							cSide = temp3;
							aSide = temp2;
							bSide = temp1;
						}
						
						//Pythagorean
						if ((cSide*cSide) == ((aSide*aSide)+(bSide*bSide))){
							results.add("YES");
						} else {
							results.add("NO");
						}
						
						if (results.size() == numDS){
							break;
						}
					}
				} int temp1 = Integer.parseInt(checker[0]); temp1 Integer.parseInt(checker[0]) Integer.parseInt Integer checker[0] checker 0 int temp2 = Integer.parseInt(checker[1]); temp2 Integer.parseInt(checker[1]) Integer.parseInt Integer checker[1] checker 1 int temp3 = Integer.parseInt(checker[2]); temp3 Integer.parseInt(checker[2]) Integer.parseInt Integer checker[2] checker 2 if (temp1 < 1 || temp1 >1000 ||
						temp2 < 1 || temp2 >1000 ||
						temp3 < 1 || temp3 >1000){
						results.add("NO");
					} else {
						//get the highest number and place to cSide
						if (temp1 > temp2 && temp1> temp3){
							cSide = temp1;
							aSide = temp2;
							bSide = temp3;
						} else if (temp2 > temp1 && temp2 > temp3){
							cSide = temp2;
							aSide = temp1;
							bSide = temp3;
						} else {
							cSide = temp3;
							aSide = temp2;
							bSide = temp1;
						}
						
						//Pythagorean
						if ((cSide*cSide) == ((aSide*aSide)+(bSide*bSide))){
							results.add("YES");
						} else {
							results.add("NO");
						}
						
						if (results.size() == numDS){
							break;
						}
					} temp1 < 1 || temp1 >1000 ||
						temp2 < 1 || temp2 >1000 ||
						temp3 < 1 || temp3 >1000 temp3 < 1 temp2 >1000 temp2 < 1 temp1 < 1 || temp1 >1000 ||
						temp2 < 1 || temp2 >1000 ||
						temp3 < 1 || temp3 >1000 temp1 < 1 temp1 1 temp1 >1000 temp1 1000 temp2 < 1 temp2 1 temp2 >1000 temp2 1000 temp3 < 1 temp3 1 temp3 >1000 temp3 1000 {
						results.add("NO");
					} results.add("NO") results.add results "NO" {
						//get the highest number and place to cSide
						if (temp1 > temp2 && temp1> temp3){
							cSide = temp1;
							aSide = temp2;
							bSide = temp3;
						} else if (temp2 > temp1 && temp2 > temp3){
							cSide = temp2;
							aSide = temp1;
							bSide = temp3;
						} else {
							cSide = temp3;
							aSide = temp2;
							bSide = temp1;
						}
						
						//Pythagorean
						if ((cSide*cSide) == ((aSide*aSide)+(bSide*bSide))){
							results.add("YES");
						} else {
							results.add("NO");
						}
						
						if (results.size() == numDS){
							break;
						}
					} if (temp1 > temp2 && temp1> temp3){
							cSide = temp1;
							aSide = temp2;
							bSide = temp3;
						} else if (temp2 > temp1 && temp2 > temp3){
							cSide = temp2;
							aSide = temp1;
							bSide = temp3;
						} else {
							cSide = temp3;
							aSide = temp2;
							bSide = temp1;
						} temp1 > temp2 && temp1> temp3 temp1 > temp2 temp1 temp2 temp1> temp3 temp1 temp3 {
							cSide = temp1;
							aSide = temp2;
							bSide = temp3;
						} cSide = temp1 cSide temp1 aSide = temp2 aSide temp2 bSide = temp3 bSide temp3 if (temp2 > temp1 && temp2 > temp3){
							cSide = temp2;
							aSide = temp1;
							bSide = temp3;
						} else {
							cSide = temp3;
							aSide = temp2;
							bSide = temp1;
						} temp2 > temp1 && temp2 > temp3 temp2 > temp1 temp2 temp1 temp2 > temp3 temp2 temp3 {
							cSide = temp2;
							aSide = temp1;
							bSide = temp3;
						} cSide = temp2 cSide temp2 aSide = temp1 aSide temp1 bSide = temp3 bSide temp3 {
							cSide = temp3;
							aSide = temp2;
							bSide = temp1;
						} cSide = temp3 cSide temp3 aSide = temp2 aSide temp2 bSide = temp1 bSide temp1 if ((cSide*cSide) == ((aSide*aSide)+(bSide*bSide))){
							results.add("YES");
						} else {
							results.add("NO");
						} (cSide*cSide) == ((aSide*aSide)+(bSide*bSide)) (cSide*cSide) cSide cSide ((aSide*aSide)+(bSide*bSide)) (aSide*aSide) aSide aSide (bSide*bSide) bSide bSide {
							results.add("YES");
						} results.add("YES") results.add results "YES" {
							results.add("NO");
						} results.add("NO") results.add results "NO" if (results.size() == numDS){
							break;
						} results.size() == numDS results.size() results.size results numDS {
							break;
						} break; for (String s: results){
				System.out.println(s);
			} String s results {
				System.out.println(s);
			} {
				System.out.println(s);
			} System.out.println(s) System.out.println System.out System System.out s String[] a a public class Main {
	
    public static void main(String[] a){
    	
    	BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
		String line;
		int numDS = -1;
		int aSide = -1;
		int bSide = -1;
		int cSide = -1;
		
		ArrayList <String> results = new ArrayList<String>();
		
		//get number of data sets
    	try {
			while ((line = stdin.readLine()) != null && 
					line.length()!= 0) {
				
				String[] checker = line.split(" ");
				
				if (checker.length == 1){
					numDS = Integer.parseInt(checker[0]);
				} else if (checker.length == 3){
				
					int temp1 = Integer.parseInt(checker[0]);
					int temp2 = Integer.parseInt(checker[1]);
					int temp3 = Integer.parseInt(checker[2]);
					
					if (temp1 < 1 || temp1 >1000 ||
						temp2 < 1 || temp2 >1000 ||
						temp3 < 1 || temp3 >1000){
						results.add("NO");
					} else {
						//get the highest number and place to cSide
						if (temp1 > temp2 && temp1> temp3){
							cSide = temp1;
							aSide = temp2;
							bSide = temp3;
						} else if (temp2 > temp1 && temp2 > temp3){
							cSide = temp2;
							aSide = temp1;
							bSide = temp3;
						} else {
							cSide = temp3;
							aSide = temp2;
							bSide = temp1;
						}
						
						//Pythagorean
						if ((cSide*cSide) == ((aSide*aSide)+(bSide*bSide))){
							results.add("YES");
						} else {
							results.add("NO");
						}
						
						if (results.size() == numDS){
							break;
						}
					}
				}
			}

			//print result
			for (String s: results){
				System.out.println(s);
			}
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			//e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			//e.printStackTrace();
		}
    }
} public class Main {
	
    public static void main(String[] a){
    	
    	BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
		String line;
		int numDS = -1;
		int aSide = -1;
		int bSide = -1;
		int cSide = -1;
		
		ArrayList <String> results = new ArrayList<String>();
		
		//get number of data sets
    	try {
			while ((line = stdin.readLine()) != null && 
					line.length()!= 0) {
				
				String[] checker = line.split(" ");
				
				if (checker.length == 1){
					numDS = Integer.parseInt(checker[0]);
				} else if (checker.length == 3){
				
					int temp1 = Integer.parseInt(checker[0]);
					int temp2 = Integer.parseInt(checker[1]);
					int temp3 = Integer.parseInt(checker[2]);
					
					if (temp1 < 1 || temp1 >1000 ||
						temp2 < 1 || temp2 >1000 ||
						temp3 < 1 || temp3 >1000){
						results.add("NO");
					} else {
						//get the highest number and place to cSide
						if (temp1 > temp2 && temp1> temp3){
							cSide = temp1;
							aSide = temp2;
							bSide = temp3;
						} else if (temp2 > temp1 && temp2 > temp3){
							cSide = temp2;
							aSide = temp1;
							bSide = temp3;
						} else {
							cSide = temp3;
							aSide = temp2;
							bSide = temp1;
						}
						
						//Pythagorean
						if ((cSide*cSide) == ((aSide*aSide)+(bSide*bSide))){
							results.add("YES");
						} else {
							results.add("NO");
						}
						
						if (results.size() == numDS){
							break;
						}
					}
				}
			}

			//print result
			for (String s: results){
				System.out.println(s);
			}
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			//e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			//e.printStackTrace();
		}
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;


public class Main {
	
    public static void main(String[] a){
    	
    	BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
		String line;
		int numDS = -1;
		int aSide = -1;
		int bSide = -1;
		int cSide = -1;
		
		ArrayList <String> results = new ArrayList<String>();
		
		//get number of data sets
    	try {
			while ((line = stdin.readLine()) != null && 
					line.length()!= 0) {
				
				String[] checker = line.split(" ");
				
				if (checker.length == 1){
					numDS = Integer.parseInt(checker[0]);
				} else if (checker.length == 3){
				
					int temp1 = Integer.parseInt(checker[0]);
					int temp2 = Integer.parseInt(checker[1]);
					int temp3 = Integer.parseInt(checker[2]);
					
					if (temp1 < 1 || temp1 >1000 ||
						temp2 < 1 || temp2 >1000 ||
						temp3 < 1 || temp3 >1000){
						results.add("NO");
					} else {
						//get the highest number and place to cSide
						if (temp1 > temp2 && temp1> temp3){
							cSide = temp1;
							aSide = temp2;
							bSide = temp3;
						} else if (temp2 > temp1 && temp2 > temp3){
							cSide = temp2;
							aSide = temp1;
							bSide = temp3;
						} else {
							cSide = temp3;
							aSide = temp2;
							bSide = temp1;
						}
						
						//Pythagorean
						if ((cSide*cSide) == ((aSide*aSide)+(bSide*bSide))){
							results.add("YES");
						} else {
							results.add("NO");
						}
						
						if (results.size() == numDS){
							break;
						}
					}
				}
			}

			//print result
			for (String s: results){
				System.out.println(s);
			}
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			//e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			//e.printStackTrace();
		}
    }
}