Go: package main
import (
        "fmt"
)

func main() {
        var num int
        fmt.Scan(&num)

        for i := 0; i < num; i++ {
                s1 := 0
                s2 := 0
                s3 := 0
                var chk int = 0
                fmt.Scanf("%d %d %d", &s1, &s2, &s3)
                if s1 >= s2 {
                        if s1 > s3 {
                                chk = 1
                        } else {
                                chk = 3
                        }
                } else {
                        if s2 >= s3 {
                                chk = 2
                        } else {
                                chk = 3
                        }
                }

                if (chk == 1 && s1*s1 == s2*s2 + s3*s3) ||
                        (chk == 2 && s2*s2 == s3*s3 + s1*s1) ||
                        (chk == 3 && s3*s3 == s1*s1 + s2*s2) {
                        fmt.Printf("YES\n")
                } else {
                        fmt.Printf("NO\n")
                }
        }
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  int n,j=0;
  int a[3];
  cin>>n;
  while(j<n){
    for(int i=0;i<3;i++){
      cin>>a[i];
    }
    sort(a,a+3);
    if(a[2]*a[2]==a[1]*a[1]+a[0]*a[0]){
    cout<<"Yes"<<endl;
  }
  else{
    cout<<"No"<<endl;
  }
  j++;
  }
}

C++: #include <iostream>
#include <algorithm>
using namespace std;

int main(void) {
    int length[3];
    int n;
    int A, B, C;
    
    cin >> n;
    
    for(int i = 0; i < n; ++i) {
        cin >> length[0] >> length[1] >> length[2];
        sort(length, length + 3);
        A = length[0];
        B = length[1];
        C = length[2];
        if(A*A + B*B == C*C) {
            cout << "Yes" << endl;
        } else {
            cout << "No" << endl;
        }
    }
}

C++: #include<iostream>
using namespace std;

void rate() {
int x, y, z;
	cin >> x >> y >> z;
	if (x*x + y*y == z*z || y*y + z*z == x*x || z*z + x*x == y*y) {
		cout << "YES\n";
	}
	else {
		cout << "NO\n";
	}

}

int main() {
	int i, k;
		cin >> k;
		for (i = 1; i <= k; i = i + 1) {
			rate();
		}
	
	return 0;
}

C++: #include <iostream>
#include <cmath>
#include <vector>
#include <algorithm>

#define upper 1000
#define lower 1
#define eN 1000

using namespace std;

bool check(int e1, int e2, int e3){
	if (((e1*e1)+(e2*e2)) == (e3*e3)){
		return true;
	}
	else{
		false;
	}
}

int main(void){
	int N;
	cin >> N;

	vector<bool> result;

	for (int i=0; i<N; ++i){
		int e1, e2, e3;
		vector<int> len;
		cin >> e1 >> e2 >> e3;
		len.push_back(e1);
		len.push_back(e2);
		len.push_back(e3);
		sort(len.begin(), len.end());
		result.push_back(check(len[0],len[1],len[2]));
	}
	for (int i=0; i<N; ++i){
		if (result[i] == true){
			cout << "YES" << endl;
		}
		else{
			cout << "NO" << endl;
		}
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
int main(void){
	int N,a,b,c;
	cin>>N;
	for(int i=1;i<=N;i++){
		cin>>a>>b>>c;
		if((a*a)+(b*b)==(c*c)){
			cout<<"Yes"<<endl;
		}
		else{
			cout<<"No"<<endl;
		}
	}
	return 0;
}

C++: #include <stdio.h>
#include <math.h>

int main(void)
{

	int a,b,c;
	int n;

	scanf("%d", &n);
	while(n--, n >= 0){
		scanf("%d %d %d", &a, &b, &c);

		a *=a;
		b *=b;
		c *=c;

		if(a == b+c || b == a+c || c == a+b)
			printf("YES\n");
		else
			printf("NO\n");
	}


	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
    int n;
    cin >> n;

    for(int i=0; i<n; i++){
        int a,b,c;
        cin >> a >> b >> c;

        if(a*a == b*b + c*c || b*b == a*a + c*c || c*c == a*a + b*b)
            cout << "YES" << endl;
        else
            cout << "NO" << endl; 
    }


    return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <array>

int main(void)
{
	int16_t data_num = 0;
	int16_t first = 0;
	int16_t second = 0;
	int16_t third = 0;
	
	std::cin >> data_num;


	std::array<int16_t, 3> sides;

	for (int i = 0; i < data_num; i++)
	{
		std::cin >> sides[0] >> sides[1] >> sides[2];

		std::sort(sides.begin(), sides.end());
		
		if ( std::pow(sides[2], 2) == (std::pow(sides[0], 2) + std::pow(sides[1], 2)) )
		{
			std::cout << "YES" << std::endl;
		}
		else
		{
			std::cout << "NO" << std::endl;
		}
	}

	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main()
{
    int a , b , c ,test;

    cin>>test;

    for(int i{0};i<test;i++){
        cin>>a>>b>>c;

        if((a * a == b * b + c * c)||(b * b == a * a + c * c)||(c * c == b * b + a * a)){
            cout<<"YES"<<endl;
        }
        else{
            cout<<"NO"<<endl;
        }

    }

    return 0;
}

C++: #include<iostream>
#include <cmath>
using namespace std;

int main(){
	int n, a, b, c;
	
	cin >> n;
	while(n--){
		cin >> a >> b >> c;
		int sum = a + b + c;
		x = max(a,max(b,c));
		y = min(a,min(b,c));
		z = sum - x - y;
		
		if(y*y + z*z == x*x)
			cout << "Yes" << endl;
		else
			cout << "No" << endl;
	}
	
    return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;

int main(){
	int n, l[3]
	cin >> n;
	for(int i = 0; i < n; i++){
		cin >> l[0] >> l[1] >> l[2];
		sort(l,l+3);
		if(l[0]*l[0] +l[1]*l[1] == l[2]*l[2])
			cout << "Yes" << endl;
		else
			cout << "No" << endl;
	}
}

C++: #include<iostream>
using namespace std;
int main()
{
	/*FILE *a;
	char b[20],op;
	int p,cod,caso;
	float c;
	do
	{
		fflush(stdin);
		cout<<"\nLa Cato S.A"<<endl;
		cout<<"\nA.Crear archivo.\nB.Ingresar Cliente. \nC.Mostrar Clientes. \nD.Salir del programa"<<endl;
		cin>>op;
		switch (op)
		{
		case 'A':
				a=fopen("La cato.txt","w");
				cout<<"\nARCHIVO CREADO"<<endl;
				break;
		case 'B':
			if(fopen("La cato.txt","w")==NULL)
				cout<<"NO HA CREADO ARCHIVO PRIMERO"<<endl;
			if(caso!=0)
				a=fopen("La cato.txt","a");
			do
			{
				p=0;
				fflush(stdin);
				puts("\nINGRESE NOMBRE: ");
				gets(b);
				for(int j=0;j<strlen(b);j++)
				{
					if(b[j]!=' '&&(b[j]<'A'||b[j]>'Z'))
					{
						fflush(stdin);
						cout<<"HAY LETRAS NO MAYUSCULAS"<<endl;
						p=1;
						break;
					}
				}
			}while(p);
			fflush(stdin);
			fprintf(a,"%s    ",b);
			do
			{
				cout<<"INGRESE CODIGO"<<endl;
				fflush(stdin);
				cin>>cod;
			}while(cod<100000||cod>999999);
			fprintf(a,"%d    ",cod);
			for(int i=0;i<3;i++)
			{
				fflush(stdin);
				do
				{
					cout<<"INGRESE PRECIO "<<i+1<<endl; //INGRSAMOS precios
					fflush(stdin);
					cin>>c;
					if(c<0)
						cout<<"ERROR, NEGATIVO"<<endl;
				}while(c<0);
				fprintf(a,"%10.2f  ",c);
			}
			caso++;
			break;
		case 'C':
			fclose(a);
			a=fopen("La cato.txt","r");
			do
			{
				c=getc(a);
				putchar(c);
			}while(c!=EOF);
			break;
		case 'D':
			fclose(a);
			break;
		default:
			cout<<"INGRESE LETRA CORRECTO"<<endl;
		}
	}while(op!='D');*/
	int cant,a,b,hip;
	cin>>cant;
	for(int i=0;i<cant;i++)
	{
		cin>>a>>b>>hip;
		if((a*a)+(b*b)==hip*hip)
			cout<<"YES"<<endl;
		else
			cout<<"NO"<<endl;
	}
	return 0;
}

C++: /*
　　　　 ∧＿∧　にっぽんちゃちゃちゃ
　／＼（　・∀・）／ヽ
（ ●　と　　　つ　● ）　にっぽんちゃちゃちゃ
　＼/⊂、 ノ　　＼ノ
　　　　　し'
*/
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);++i)
#define repone(i,n) for(int i=1;i<(int)(n);++i)
#define repo(i,o,n) for(int i=o;i<(int)(n);++i)
#define Rep(j,n) for(int j=0;j<(int)(n);++j)
#define Repone(j,n) for(int j=1;j<(int)(n);++j)
#define all(v) (v).begin(),(v).end()
#define rall(v) (v).rbegin(),(v).rend()
#define int long long
#define MOD 1000000007
#define INF 9223372036854775807


signed main()
{
  string xyz ="";
int x=0,y=0,z=0,w=0,i=0,j=0,n=0;
std::vector<int> v;
std::cin >> w;
rep(i,w){
  std::cin >> x>>y>>z;
  if(x>y&&x>z&&x*x==y*y+z*z){
      std::cout << "YES" << '\n';


  }else if(y>x&&y>z&&y*y==x*x+z*z){

      std::cout << "YES" << '\n';

  }else if(z>x&&z>y&&z*z==x*x+y*y){
      std::cout << "YES" << '\n';

  }else{
    std::cout << "NO" << '\n';
  }
}
}