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 N = Integer.parseInt(br.readLine());

		for(int i=0;i<N;i++) {
			String[] lc = br.readLine().split(" ");
			int a = Integer.parseInt(lc[0]);
			int b = Integer.parseInt(lc[1]);
			int c = Integer.parseInt(lc[2]);
			
			if(a*a+b*b==c*c || b*b+c*c==a*a || c*c+a*a==b*b)
			{
				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 N = Integer.parseInt(br.readLine());

		for(int i=0;i<N;i++) {
			String[] lc = br.readLine().split(" ");
			int a = Integer.parseInt(lc[0]);
			int b = Integer.parseInt(lc[1]);
			int c = Integer.parseInt(lc[2]);
			
			if(a*a+b*b==c*c || b*b+c*c==a*a || c*c+a*a==b*b)
			{
				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 N = Integer.parseInt(br.readLine());

		for(int i=0;i<N;i++) {
			String[] lc = br.readLine().split(" ");
			int a = Integer.parseInt(lc[0]);
			int b = Integer.parseInt(lc[1]);
			int c = Integer.parseInt(lc[2]);
			
			if(a*a+b*b==c*c || b*b+c*c==a*a || c*c+a*a==b*b)
			{
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		}

	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		int N = Integer.parseInt(br.readLine());

		for(int i=0;i<N;i++) {
			String[] lc = br.readLine().split(" ");
			int a = Integer.parseInt(lc[0]);
			int b = Integer.parseInt(lc[1]);
			int c = Integer.parseInt(lc[2]);
			
			if(a*a+b*b==c*c || b*b+c*c==a*a || c*c+a*a==b*b)
			{
				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 N = Integer.parseInt(br.readLine()); N Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br for(int i=0;i<N;i++) {
			String[] lc = br.readLine().split(" ");
			int a = Integer.parseInt(lc[0]);
			int b = Integer.parseInt(lc[1]);
			int c = Integer.parseInt(lc[2]);
			
			if(a*a+b*b==c*c || b*b+c*c==a*a || c*c+a*a==b*b)
			{
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		} int i=0; int i=0; i 0 i<N i N i++ i++ i {
			String[] lc = br.readLine().split(" ");
			int a = Integer.parseInt(lc[0]);
			int b = Integer.parseInt(lc[1]);
			int c = Integer.parseInt(lc[2]);
			
			if(a*a+b*b==c*c || b*b+c*c==a*a || c*c+a*a==b*b)
			{
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		} {
			String[] lc = br.readLine().split(" ");
			int a = Integer.parseInt(lc[0]);
			int b = Integer.parseInt(lc[1]);
			int c = Integer.parseInt(lc[2]);
			
			if(a*a+b*b==c*c || b*b+c*c==a*a || c*c+a*a==b*b)
			{
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		} String[] lc = br.readLine().split(" "); lc br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int a = Integer.parseInt(lc[0]); a Integer.parseInt(lc[0]) Integer.parseInt Integer lc[0] lc 0 int b = Integer.parseInt(lc[1]); b Integer.parseInt(lc[1]) Integer.parseInt Integer lc[1] lc 1 int c = Integer.parseInt(lc[2]); c Integer.parseInt(lc[2]) Integer.parseInt Integer lc[2] lc 2 if(a*a+b*b==c*c || b*b+c*c==a*a || c*c+a*a==b*b)
			{
				System.out.println("YES");
			}else{
				System.out.println("NO");
			} a*a+b*b==c*c || b*b+c*c==a*a || c*c+a*a==b*b a*a+b*b==c*c || b*b+c*c==a*a || c*c+a*a==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 c*c+a*a==b*b c*c+a*a c*c c c a*a a a b*b b b {
				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 N = Integer.parseInt(br.readLine());

		for(int i=0;i<N;i++) {
			String[] lc = br.readLine().split(" ");
			int a = Integer.parseInt(lc[0]);
			int b = Integer.parseInt(lc[1]);
			int c = Integer.parseInt(lc[2]);
			
			if(a*a+b*b==c*c || b*b+c*c==a*a || c*c+a*a==b*b)
			{
				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 N = Integer.parseInt(br.readLine());

		for(int i=0;i<N;i++) {
			String[] lc = br.readLine().split(" ");
			int a = Integer.parseInt(lc[0]);
			int b = Integer.parseInt(lc[1]);
			int c = Integer.parseInt(lc[2]);
			
			if(a*a+b*b==c*c || b*b+c*c==a*a || c*c+a*a==b*b)
			{
				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 N = Integer.parseInt(br.readLine());

		for(int i=0;i<N;i++) {
			String[] lc = br.readLine().split(" ");
			int a = Integer.parseInt(lc[0]);
			int b = Integer.parseInt(lc[1]);
			int c = Integer.parseInt(lc[2]);
			
			if(a*a+b*b==c*c || b*b+c*c==a*a || c*c+a*a==b*b)
			{
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		}

	}
}