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));
		
		int length = Integer.parseInt(br.readLine());
		for(int i = 0;i<length;i++){
			String[] num = br.readLine().split(" ");
			int a = Integer.parseInt(num[0]);
			int b = Integer.parseInt(num[1]);
			int c = Integer.parseInt(num[2]);
			
			int rightc = a*a+b*b;
			int rightb = a*a+c*c;
			int righta = b*b+c*c;
			if(c*c==rightc ||b*b==rightb || a*a==righta){
				System.out.println("YES");
			} else{
				System.out.println("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));
		
		int length = Integer.parseInt(br.readLine());
		for(int i = 0;i<length;i++){
			String[] num = br.readLine().split(" ");
			int a = Integer.parseInt(num[0]);
			int b = Integer.parseInt(num[1]);
			int c = Integer.parseInt(num[2]);
			
			int rightc = a*a+b*b;
			int rightb = a*a+c*c;
			int righta = b*b+c*c;
			if(c*c==rightc ||b*b==rightb || a*a==righta){
				System.out.println("YES");
			} else{
				System.out.println("NO");
			}
		}
	}
} Main public static void main(String[] args) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		int length = Integer.parseInt(br.readLine());
		for(int i = 0;i<length;i++){
			String[] num = br.readLine().split(" ");
			int a = Integer.parseInt(num[0]);
			int b = Integer.parseInt(num[1]);
			int c = Integer.parseInt(num[2]);
			
			int rightc = a*a+b*b;
			int rightb = a*a+c*c;
			int righta = b*b+c*c;
			if(c*c==rightc ||b*b==rightb || a*a==righta){
				System.out.println("YES");
			} else{
				System.out.println("NO");
			}
		}
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		int length = Integer.parseInt(br.readLine());
		for(int i = 0;i<length;i++){
			String[] num = br.readLine().split(" ");
			int a = Integer.parseInt(num[0]);
			int b = Integer.parseInt(num[1]);
			int c = Integer.parseInt(num[2]);
			
			int rightc = a*a+b*b;
			int rightb = a*a+c*c;
			int righta = b*b+c*c;
			if(c*c==rightc ||b*b==rightb || a*a==righta){
				System.out.println("YES");
			} else{
				System.out.println("NO");
			}
		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int length = Integer.parseInt(br.readLine()); length Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br for(int i = 0;i<length;i++){
			String[] num = br.readLine().split(" ");
			int a = Integer.parseInt(num[0]);
			int b = Integer.parseInt(num[1]);
			int c = Integer.parseInt(num[2]);
			
			int rightc = a*a+b*b;
			int rightb = a*a+c*c;
			int righta = b*b+c*c;
			if(c*c==rightc ||b*b==rightb || a*a==righta){
				System.out.println("YES");
			} else{
				System.out.println("NO");
			}
		} int i = 0; int i = 0; i 0 i<length i length i++ i++ i {
			String[] num = br.readLine().split(" ");
			int a = Integer.parseInt(num[0]);
			int b = Integer.parseInt(num[1]);
			int c = Integer.parseInt(num[2]);
			
			int rightc = a*a+b*b;
			int rightb = a*a+c*c;
			int righta = b*b+c*c;
			if(c*c==rightc ||b*b==rightb || a*a==righta){
				System.out.println("YES");
			} else{
				System.out.println("NO");
			}
		} {
			String[] num = br.readLine().split(" ");
			int a = Integer.parseInt(num[0]);
			int b = Integer.parseInt(num[1]);
			int c = Integer.parseInt(num[2]);
			
			int rightc = a*a+b*b;
			int rightb = a*a+c*c;
			int righta = b*b+c*c;
			if(c*c==rightc ||b*b==rightb || a*a==righta){
				System.out.println("YES");
			} else{
				System.out.println("NO");
			}
		} String[] num = br.readLine().split(" "); num br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int a = Integer.parseInt(num[0]); a Integer.parseInt(num[0]) Integer.parseInt Integer num[0] num 0 int b = Integer.parseInt(num[1]); b Integer.parseInt(num[1]) Integer.parseInt Integer num[1] num 1 int c = Integer.parseInt(num[2]); c Integer.parseInt(num[2]) Integer.parseInt Integer num[2] num 2 int rightc = a*a+b*b; rightc a*a+b*b a*a a a b*b b b int rightb = a*a+c*c; rightb a*a+c*c a*a a a c*c c c int righta = b*b+c*c; righta b*b+c*c b*b b b c*c c c if(c*c==rightc ||b*b==rightb || a*a==righta){
				System.out.println("YES");
			} else{
				System.out.println("NO");
			} c*c==rightc ||b*b==rightb || a*a==righta c*c==rightc ||b*b==rightb || a*a==righta c*c==rightc c*c c c rightc b*b==rightb b*b b b rightb a*a==righta a*a a a righta {
				System.out.println("YES");
			} System.out.println("YES") System.out.println System.out System System.out "YES" {
				System.out.println("NO");
			} System.out.println("NO") System.out.println System.out System System.out "NO" String[] args args public class Main{
	public static void main(String[] args) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		int length = Integer.parseInt(br.readLine());
		for(int i = 0;i<length;i++){
			String[] num = br.readLine().split(" ");
			int a = Integer.parseInt(num[0]);
			int b = Integer.parseInt(num[1]);
			int c = Integer.parseInt(num[2]);
			
			int rightc = a*a+b*b;
			int rightb = a*a+c*c;
			int righta = b*b+c*c;
			if(c*c==rightc ||b*b==rightb || a*a==righta){
				System.out.println("YES");
			} else{
				System.out.println("NO");
			}
		}
	}
} public class Main{
	public static void main(String[] args) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		int length = Integer.parseInt(br.readLine());
		for(int i = 0;i<length;i++){
			String[] num = br.readLine().split(" ");
			int a = Integer.parseInt(num[0]);
			int b = Integer.parseInt(num[1]);
			int c = Integer.parseInt(num[2]);
			
			int rightc = a*a+b*b;
			int rightb = a*a+c*c;
			int righta = b*b+c*c;
			if(c*c==rightc ||b*b==rightb || a*a==righta){
				System.out.println("YES");
			} else{
				System.out.println("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));
		
		int length = Integer.parseInt(br.readLine());
		for(int i = 0;i<length;i++){
			String[] num = br.readLine().split(" ");
			int a = Integer.parseInt(num[0]);
			int b = Integer.parseInt(num[1]);
			int c = Integer.parseInt(num[2]);
			
			int rightc = a*a+b*b;
			int rightb = a*a+c*c;
			int righta = b*b+c*c;
			if(c*c==rightc ||b*b==rightb || a*a==righta){
				System.out.println("YES");
			} else{
				System.out.println("NO");
			}
		}
	}
}
			