import java.util.Scanner;
import java.util.Arrays;
 
public class Main
{
    public static void main(String[] args)
    {
	Scanner cin = new Scanner(System.in);
	int N = cin.nextInt();
	for(int i=1; i<=N; i++){
		int[] len = new int[3];
		for(int j=0; j<3; j++){ len[j] = cin.nextInt();}
		Arrays.sort(len);
		if(len[0]*len[0] + len[1]*len[1] == len[2]*len[2]){System.out.println("YES");} else{System.out.println("NO");}
	}
    }
} import java.util.Scanner; Scanner java.util import java.util.Arrays; Arrays java.util public class Main
{
    public static void main(String[] args)
    {
	Scanner cin = new Scanner(System.in);
	int N = cin.nextInt();
	for(int i=1; i<=N; i++){
		int[] len = new int[3];
		for(int j=0; j<3; j++){ len[j] = cin.nextInt();}
		Arrays.sort(len);
		if(len[0]*len[0] + len[1]*len[1] == len[2]*len[2]){System.out.println("YES");} else{System.out.println("NO");}
	}
    }
} Main public static void main(String[] args)
    {
	Scanner cin = new Scanner(System.in);
	int N = cin.nextInt();
	for(int i=1; i<=N; i++){
		int[] len = new int[3];
		for(int j=0; j<3; j++){ len[j] = cin.nextInt();}
		Arrays.sort(len);
		if(len[0]*len[0] + len[1]*len[1] == len[2]*len[2]){System.out.println("YES");} else{System.out.println("NO");}
	}
    } main {
	Scanner cin = new Scanner(System.in);
	int N = cin.nextInt();
	for(int i=1; i<=N; i++){
		int[] len = new int[3];
		for(int j=0; j<3; j++){ len[j] = cin.nextInt();}
		Arrays.sort(len);
		if(len[0]*len[0] + len[1]*len[1] == len[2]*len[2]){System.out.println("YES");} else{System.out.println("NO");}
	}
    } Scanner cin = new Scanner(System.in); cin new Scanner(System.in) int N = cin.nextInt(); N cin.nextInt() cin.nextInt cin for(int i=1; i<=N; i++){
		int[] len = new int[3];
		for(int j=0; j<3; j++){ len[j] = cin.nextInt();}
		Arrays.sort(len);
		if(len[0]*len[0] + len[1]*len[1] == len[2]*len[2]){System.out.println("YES");} else{System.out.println("NO");}
	} int i=1; int i=1; i 1 i<=N i N i++ i++ i {
		int[] len = new int[3];
		for(int j=0; j<3; j++){ len[j] = cin.nextInt();}
		Arrays.sort(len);
		if(len[0]*len[0] + len[1]*len[1] == len[2]*len[2]){System.out.println("YES");} else{System.out.println("NO");}
	} {
		int[] len = new int[3];
		for(int j=0; j<3; j++){ len[j] = cin.nextInt();}
		Arrays.sort(len);
		if(len[0]*len[0] + len[1]*len[1] == len[2]*len[2]){System.out.println("YES");} else{System.out.println("NO");}
	} int[] len = new int[3]; len new int[3] 3 for(int j=0; j<3; j++){ len[j] = cin.nextInt();} int j=0; int j=0; j 0 j<3 j 3 j++ j++ j { len[j] = cin.nextInt();} { len[j] = cin.nextInt();} len[j] = cin.nextInt() len[j] len j cin.nextInt() cin.nextInt cin Arrays.sort(len) Arrays.sort Arrays len if(len[0]*len[0] + len[1]*len[1] == len[2]*len[2]){System.out.println("YES");} else{System.out.println("NO");} len[0]*len[0] + len[1]*len[1] == len[2]*len[2] len[0]*len[0] + len[1]*len[1] len[0]*len[0] len[0] len 0 len[0] len 0 len[1]*len[1] len[1] len 1 len[1] len 1 len[2]*len[2] len[2] len 2 len[2] len 2 {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)
    {
	Scanner cin = new Scanner(System.in);
	int N = cin.nextInt();
	for(int i=1; i<=N; i++){
		int[] len = new int[3];
		for(int j=0; j<3; j++){ len[j] = cin.nextInt();}
		Arrays.sort(len);
		if(len[0]*len[0] + len[1]*len[1] == len[2]*len[2]){System.out.println("YES");} else{System.out.println("NO");}
	}
    }
} public class Main
{
    public static void main(String[] args)
    {
	Scanner cin = new Scanner(System.in);
	int N = cin.nextInt();
	for(int i=1; i<=N; i++){
		int[] len = new int[3];
		for(int j=0; j<3; j++){ len[j] = cin.nextInt();}
		Arrays.sort(len);
		if(len[0]*len[0] + len[1]*len[1] == len[2]*len[2]){System.out.println("YES");} else{System.out.println("NO");}
	}
    }
} Main
import java.util.Scanner;
import java.util.Arrays;
 
public class Main
{
    public static void main(String[] args)
    {
	Scanner cin = new Scanner(System.in);
	int N = cin.nextInt();
	for(int i=1; i<=N; i++){
		int[] len = new int[3];
		for(int j=0; j<3; j++){ len[j] = cin.nextInt();}
		Arrays.sort(len);
		if(len[0]*len[0] + len[1]*len[1] == len[2]*len[2]){System.out.println("YES");} else{System.out.println("NO");}
	}
    }
}