import java.util.Scanner;
public class Main{

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner kb=new Scanner(System.in);
int size=kb.nextInt();
int a[][]=new int[size][3];
int x,y,z;
for(int i=0;i<size;i++){
	a[i][0]=kb.nextInt();
	a[i][1]=kb.nextInt();
	a[i][2]=kb.nextInt();
}
for(int i=0;i<size;i++){
x=a[i][0];
y=a[i][1];
z=a[i][2];
if(x*x+y*y==z*z||y*y+z*z==x*x||z*z+x*x==y*y){
	System.out.println("YES");
}else{
	System.out.println("NO");
}
}
	}

} import java.util.Scanner; Scanner java.util public class Main{

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner kb=new Scanner(System.in);
int size=kb.nextInt();
int a[][]=new int[size][3];
int x,y,z;
for(int i=0;i<size;i++){
	a[i][0]=kb.nextInt();
	a[i][1]=kb.nextInt();
	a[i][2]=kb.nextInt();
}
for(int i=0;i<size;i++){
x=a[i][0];
y=a[i][1];
z=a[i][2];
if(x*x+y*y==z*z||y*y+z*z==x*x||z*z+x*x==y*y){
	System.out.println("YES");
}else{
	System.out.println("NO");
}
}
	}

} Main public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner kb=new Scanner(System.in);
int size=kb.nextInt();
int a[][]=new int[size][3];
int x,y,z;
for(int i=0;i<size;i++){
	a[i][0]=kb.nextInt();
	a[i][1]=kb.nextInt();
	a[i][2]=kb.nextInt();
}
for(int i=0;i<size;i++){
x=a[i][0];
y=a[i][1];
z=a[i][2];
if(x*x+y*y==z*z||y*y+z*z==x*x||z*z+x*x==y*y){
	System.out.println("YES");
}else{
	System.out.println("NO");
}
}
	} main {
		// TODO ?????????????????????????????????????????????
		Scanner kb=new Scanner(System.in);
int size=kb.nextInt();
int a[][]=new int[size][3];
int x,y,z;
for(int i=0;i<size;i++){
	a[i][0]=kb.nextInt();
	a[i][1]=kb.nextInt();
	a[i][2]=kb.nextInt();
}
for(int i=0;i<size;i++){
x=a[i][0];
y=a[i][1];
z=a[i][2];
if(x*x+y*y==z*z||y*y+z*z==x*x||z*z+x*x==y*y){
	System.out.println("YES");
}else{
	System.out.println("NO");
}
}
	} Scanner kb=new Scanner(System.in); kb new Scanner(System.in) int size=kb.nextInt(); size kb.nextInt() kb.nextInt kb int a[][]=new int[size][3]; a new int[size][3] size 3 int x x y y z; z for(int i=0;i<size;i++){
	a[i][0]=kb.nextInt();
	a[i][1]=kb.nextInt();
	a[i][2]=kb.nextInt();
} int i=0; int i=0; i 0 i<size i size i++ i++ i {
	a[i][0]=kb.nextInt();
	a[i][1]=kb.nextInt();
	a[i][2]=kb.nextInt();
} {
	a[i][0]=kb.nextInt();
	a[i][1]=kb.nextInt();
	a[i][2]=kb.nextInt();
} a[i][0]=kb.nextInt() a[i][0] a[i] a i 0 kb.nextInt() kb.nextInt kb a[i][1]=kb.nextInt() a[i][1] a[i] a i 1 kb.nextInt() kb.nextInt kb a[i][2]=kb.nextInt() a[i][2] a[i] a i 2 kb.nextInt() kb.nextInt kb for(int i=0;i<size;i++){
x=a[i][0];
y=a[i][1];
z=a[i][2];
if(x*x+y*y==z*z||y*y+z*z==x*x||z*z+x*x==y*y){
	System.out.println("YES");
}else{
	System.out.println("NO");
}
} int i=0; int i=0; i 0 i<size i size i++ i++ i {
x=a[i][0];
y=a[i][1];
z=a[i][2];
if(x*x+y*y==z*z||y*y+z*z==x*x||z*z+x*x==y*y){
	System.out.println("YES");
}else{
	System.out.println("NO");
}
} {
x=a[i][0];
y=a[i][1];
z=a[i][2];
if(x*x+y*y==z*z||y*y+z*z==x*x||z*z+x*x==y*y){
	System.out.println("YES");
}else{
	System.out.println("NO");
}
} x=a[i][0] x a[i][0] a[i] a i 0 y=a[i][1] y a[i][1] a[i] a i 1 z=a[i][2] z a[i][2] a[i] a i 2 if(x*x+y*y==z*z||y*y+z*z==x*x||z*z+x*x==y*y){
	System.out.println("YES");
}else{
	System.out.println("NO");
} x*x+y*y==z*z||y*y+z*z==x*x||z*z+x*x==y*y x*x+y*y==z*z||y*y+z*z==x*x||z*z+x*x==y*y x*x+y*y==z*z x*x+y*y x*x x x y*y y y z*z z z y*y+z*z==x*x y*y+z*z y*y y y z*z z z x*x x x z*z+x*x==y*y z*z+x*x z*z z z x*x x x y*y y y {
	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) {
		// TODO ?????????????????????????????????????????????
		Scanner kb=new Scanner(System.in);
int size=kb.nextInt();
int a[][]=new int[size][3];
int x,y,z;
for(int i=0;i<size;i++){
	a[i][0]=kb.nextInt();
	a[i][1]=kb.nextInt();
	a[i][2]=kb.nextInt();
}
for(int i=0;i<size;i++){
x=a[i][0];
y=a[i][1];
z=a[i][2];
if(x*x+y*y==z*z||y*y+z*z==x*x||z*z+x*x==y*y){
	System.out.println("YES");
}else{
	System.out.println("NO");
}
}
	}

} public class Main{

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner kb=new Scanner(System.in);
int size=kb.nextInt();
int a[][]=new int[size][3];
int x,y,z;
for(int i=0;i<size;i++){
	a[i][0]=kb.nextInt();
	a[i][1]=kb.nextInt();
	a[i][2]=kb.nextInt();
}
for(int i=0;i<size;i++){
x=a[i][0];
y=a[i][1];
z=a[i][2];
if(x*x+y*y==z*z||y*y+z*z==x*x||z*z+x*x==y*y){
	System.out.println("YES");
}else{
	System.out.println("NO");
}
}
	}

} Main
import java.util.Scanner;
public class Main{

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner kb=new Scanner(System.in);
int size=kb.nextInt();
int a[][]=new int[size][3];
int x,y,z;
for(int i=0;i<size;i++){
	a[i][0]=kb.nextInt();
	a[i][1]=kb.nextInt();
	a[i][2]=kb.nextInt();
}
for(int i=0;i<size;i++){
x=a[i][0];
y=a[i][1];
z=a[i][2];
if(x*x+y*y==z*z||y*y+z*z==x*x||z*z+x*x==y*y){
	System.out.println("YES");
}else{
	System.out.println("NO");
}
}
	}

}