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

public class Main{
	public static void main(String args[]) throws IOException{
		InputStreamReader inputStreamReader = new InputStreamReader(System.in);
		BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
		int n = Integer.parseInt(bufferedReader.readLine());
		StringBuilder answer = new StringBuilder();
		for(int i=0; i<n; i++){
			String[] dataSet = bufferedReader.readLine().split(" ");
			double x = Math.pow(Integer.parseInt(dataSet[0]), 2);
			double y = Math.pow(Integer.parseInt(dataSet[1]), 2);
			double z = Math.pow(Integer.parseInt(dataSet[2]), 2);
			
			if(x+y==z || x+z==y || y+z==x){
				answer.append("YES\n");	
			}else{
				answer.append("NO\n");	
			}
		}
		System.out.print(answer);
	}	
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main{
	public static void main(String args[]) throws IOException{
		InputStreamReader inputStreamReader = new InputStreamReader(System.in);
		BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
		int n = Integer.parseInt(bufferedReader.readLine());
		StringBuilder answer = new StringBuilder();
		for(int i=0; i<n; i++){
			String[] dataSet = bufferedReader.readLine().split(" ");
			double x = Math.pow(Integer.parseInt(dataSet[0]), 2);
			double y = Math.pow(Integer.parseInt(dataSet[1]), 2);
			double z = Math.pow(Integer.parseInt(dataSet[2]), 2);
			
			if(x+y==z || x+z==y || y+z==x){
				answer.append("YES\n");	
			}else{
				answer.append("NO\n");	
			}
		}
		System.out.print(answer);
	}	
} Main public static void main(String args[]) throws IOException{
		InputStreamReader inputStreamReader = new InputStreamReader(System.in);
		BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
		int n = Integer.parseInt(bufferedReader.readLine());
		StringBuilder answer = new StringBuilder();
		for(int i=0; i<n; i++){
			String[] dataSet = bufferedReader.readLine().split(" ");
			double x = Math.pow(Integer.parseInt(dataSet[0]), 2);
			double y = Math.pow(Integer.parseInt(dataSet[1]), 2);
			double z = Math.pow(Integer.parseInt(dataSet[2]), 2);
			
			if(x+y==z || x+z==y || y+z==x){
				answer.append("YES\n");	
			}else{
				answer.append("NO\n");	
			}
		}
		System.out.print(answer);
	} main {
		InputStreamReader inputStreamReader = new InputStreamReader(System.in);
		BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
		int n = Integer.parseInt(bufferedReader.readLine());
		StringBuilder answer = new StringBuilder();
		for(int i=0; i<n; i++){
			String[] dataSet = bufferedReader.readLine().split(" ");
			double x = Math.pow(Integer.parseInt(dataSet[0]), 2);
			double y = Math.pow(Integer.parseInt(dataSet[1]), 2);
			double z = Math.pow(Integer.parseInt(dataSet[2]), 2);
			
			if(x+y==z || x+z==y || y+z==x){
				answer.append("YES\n");	
			}else{
				answer.append("NO\n");	
			}
		}
		System.out.print(answer);
	} InputStreamReader inputStreamReader = new InputStreamReader(System.in); inputStreamReader new InputStreamReader(System.in) BufferedReader bufferedReader = new BufferedReader(inputStreamReader); bufferedReader new BufferedReader(inputStreamReader) int n = Integer.parseInt(bufferedReader.readLine()); n Integer.parseInt(bufferedReader.readLine()) Integer.parseInt Integer bufferedReader.readLine() bufferedReader.readLine bufferedReader StringBuilder answer = new StringBuilder(); answer new StringBuilder() for(int i=0; i<n; i++){
			String[] dataSet = bufferedReader.readLine().split(" ");
			double x = Math.pow(Integer.parseInt(dataSet[0]), 2);
			double y = Math.pow(Integer.parseInt(dataSet[1]), 2);
			double z = Math.pow(Integer.parseInt(dataSet[2]), 2);
			
			if(x+y==z || x+z==y || y+z==x){
				answer.append("YES\n");	
			}else{
				answer.append("NO\n");	
			}
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			String[] dataSet = bufferedReader.readLine().split(" ");
			double x = Math.pow(Integer.parseInt(dataSet[0]), 2);
			double y = Math.pow(Integer.parseInt(dataSet[1]), 2);
			double z = Math.pow(Integer.parseInt(dataSet[2]), 2);
			
			if(x+y==z || x+z==y || y+z==x){
				answer.append("YES\n");	
			}else{
				answer.append("NO\n");	
			}
		} {
			String[] dataSet = bufferedReader.readLine().split(" ");
			double x = Math.pow(Integer.parseInt(dataSet[0]), 2);
			double y = Math.pow(Integer.parseInt(dataSet[1]), 2);
			double z = Math.pow(Integer.parseInt(dataSet[2]), 2);
			
			if(x+y==z || x+z==y || y+z==x){
				answer.append("YES\n");	
			}else{
				answer.append("NO\n");	
			}
		} String[] dataSet = bufferedReader.readLine().split(" "); dataSet bufferedReader.readLine().split(" ") bufferedReader.readLine().split bufferedReader.readLine() bufferedReader.readLine bufferedReader " " double x = Math.pow(Integer.parseInt(dataSet[0]), 2); x Math.pow(Integer.parseInt(dataSet[0]), 2) Math.pow Math Integer.parseInt(dataSet[0]) Integer.parseInt Integer dataSet[0] dataSet 0 2 double y = Math.pow(Integer.parseInt(dataSet[1]), 2); y Math.pow(Integer.parseInt(dataSet[1]), 2) Math.pow Math Integer.parseInt(dataSet[1]) Integer.parseInt Integer dataSet[1] dataSet 1 2 double z = Math.pow(Integer.parseInt(dataSet[2]), 2); z Math.pow(Integer.parseInt(dataSet[2]), 2) Math.pow Math Integer.parseInt(dataSet[2]) Integer.parseInt Integer dataSet[2] dataSet 2 2 if(x+y==z || x+z==y || y+z==x){
				answer.append("YES\n");	
			}else{
				answer.append("NO\n");	
			} x+y==z || x+z==y || y+z==x x+y==z || x+z==y || y+z==x x+y==z x+y x y z x+z==y x+z x z y y+z==x y+z y z x {
				answer.append("YES\n");	
			} answer.append("YES\n") answer.append answer "YES\n" {
				answer.append("NO\n");	
			} answer.append("NO\n") answer.append answer "NO\n" System.out.print(answer) System.out.print System.out System System.out answer String args[] args public class Main{
	public static void main(String args[]) throws IOException{
		InputStreamReader inputStreamReader = new InputStreamReader(System.in);
		BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
		int n = Integer.parseInt(bufferedReader.readLine());
		StringBuilder answer = new StringBuilder();
		for(int i=0; i<n; i++){
			String[] dataSet = bufferedReader.readLine().split(" ");
			double x = Math.pow(Integer.parseInt(dataSet[0]), 2);
			double y = Math.pow(Integer.parseInt(dataSet[1]), 2);
			double z = Math.pow(Integer.parseInt(dataSet[2]), 2);
			
			if(x+y==z || x+z==y || y+z==x){
				answer.append("YES\n");	
			}else{
				answer.append("NO\n");	
			}
		}
		System.out.print(answer);
	}	
} public class Main{
	public static void main(String args[]) throws IOException{
		InputStreamReader inputStreamReader = new InputStreamReader(System.in);
		BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
		int n = Integer.parseInt(bufferedReader.readLine());
		StringBuilder answer = new StringBuilder();
		for(int i=0; i<n; i++){
			String[] dataSet = bufferedReader.readLine().split(" ");
			double x = Math.pow(Integer.parseInt(dataSet[0]), 2);
			double y = Math.pow(Integer.parseInt(dataSet[1]), 2);
			double z = Math.pow(Integer.parseInt(dataSet[2]), 2);
			
			if(x+y==z || x+z==y || y+z==x){
				answer.append("YES\n");	
			}else{
				answer.append("NO\n");	
			}
		}
		System.out.print(answer);
	}	
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main{
	public static void main(String args[]) throws IOException{
		InputStreamReader inputStreamReader = new InputStreamReader(System.in);
		BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
		int n = Integer.parseInt(bufferedReader.readLine());
		StringBuilder answer = new StringBuilder();
		for(int i=0; i<n; i++){
			String[] dataSet = bufferedReader.readLine().split(" ");
			double x = Math.pow(Integer.parseInt(dataSet[0]), 2);
			double y = Math.pow(Integer.parseInt(dataSet[1]), 2);
			double z = Math.pow(Integer.parseInt(dataSet[2]), 2);
			
			if(x+y==z || x+z==y || y+z==x){
				answer.append("YES\n");	
			}else{
				answer.append("NO\n");	
			}
		}
		System.out.print(answer);
	}	
}