Go: // 九九を出すだけ
package main
import (
	"fmt"
	"os"
	"bufio"
	"strconv"
	"sort"
)

var sc = bufio.NewScanner(os.Stdin)
var out = bufio.NewWriter(os.Stdout)

func main(){
	sc.Split(bufio.ScanWords)
	defer out.Flush()
	n := nextInt()
	for i:=0; i<n; i++{
	    data := nextInts(3)
	    sort.Ints(data)
	    if data[0]*data[0]+data[1]*data[1] == data[2]*data[2]{
	        fmt.Fprintln(out, "YES")
	    }else{
	        fmt.Fprintln(out, "NO")
	    }
	}
}

func next() string{
	sc.Scan()
	return sc.Text()
}

func nextInt() int{
	a, _ := strconv.Atoi(next())
	return a
}

func nextInts(n int) []int{
    a := make([]int, n)
    for i:=0; i<n; i++{
        a[i] = nextInt()
    }
    return a
}

C++: #include <iostream>
#include <stdio.h>
#include <vector>
#include <algorithm>

#define REP(i,n) for(int i = 0;i<(int)n;i++)
#define FOR(i,a,b) for(int i = (a);i < (b);i++)
#define RFOR(i,a,b) for(int i = (a);i>(b);i--)

using namespace std;

int main(void){
    
    int number;
    int hen[3];
    int temp;
    cin >> number;
    bool judge[1020];
    
    REP(i,number)
    {
        REP(i, 3)
        cin >> hen[i];
        REP(i, 2)
        REP(j, 2)
        {
            if(hen[j] < hen[j+1])
            {
                temp = hen[j+1];
                hen[j+1] = hen[j];
                hen[j] = temp;
            }
        }
        if(hen[0]*hen[0] == (hen[1]*hen[1] + hen[2]*hen[2]))
            judge[i] = true;
        else
            judge[i] = false;
        
    }
    REP(i, number)
    {
        if(judge[i])
            cout << "YES" << endl;
        else
            cout << "NO" << endl;
    }
  
    
    return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;

#define REP(i, x) for (int i = 0; i < (int)(x); i++)
#define REPS(i, x) for (int i = 1; i <= (int)(x); i++)

int main(int argc, char *argv[])
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

    int n, a, b, c;
    cin >> n;

    vector<int> l(3);
    REP(i, n)
    {
        cin >> l[0] >> l[1] >> l[2];
        sort(l.begin(), l.end());
        cout << (l[0] * l[0] + l[1] * l[1] == l[2] * l[2] ? "YES" : "NO") << endl;
    }

    return 0;
}

C++: #include <iostream>
#include <cstdio>
#define NMAX (1000)
using namespace std;
int main(void){
    
    int N = 0;
    int a=0;
    int b=0;
    int c=0;
    char* Result[NMAX];

    //N??°?????\???
    scanf("%d",&N);
    
    //N?????°???????????????a,b,c???????????????
    for(int Ncount = 0; Ncount < N; Ncount++){
        scanf("%d %d %d",&a,&b,&c);
        
        if( (( (a^2) + (b^2) ) == (c^2)) || (( (b^2) + (c^2) ) == (a^2)) || (( (c^2) + (b^2) ) == (a^2))){
            Result[Ncount] = "YES";
        }else{
            Result[Ncount] = "NO";
        }
    }
    
    //??????????????????????????¨???Yes or No?????????
    for(int Ncount=0;Ncount < N;Ncount++){
        printf("%s\n",Result[Ncount]);
    }
    
}

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

main()
{
    int t;
    double a,b,c,res;

    scanf("%d",&t);

    while(t--)
    {
        scanf("%lf%lf%lf",&a,&b,&c);

        if((a*a+b*b)==c*c)
        {
            printf("YES\n");
        }
        else if((b*b+c*c)==a*a)
        {
            printf("YES\n");
        }
        else if((c*c+a*a)==b*b)
        {
            printf("YES\n");
        }
        else
        {
            printf("NO\n");
        }
    }
    return 0;
}

C++: #include<stdio.h>
#include <string>
#include <iostream>
#include <vector>
#include <sstream>
#include<math.h>
#include <algorithm>
using namespace std;



int main(void)
{
  double a,b,c;
  int d;
  double Max,Min,ans;
  vector<int> array;
  int i=0;
  cin>>d;

  while(i<d)
    {
	cin>>a>>b>>c;
	 if(!cin)break;
	 Max=max(a,b);
	 Max=max(Max,c);
	 Min=min(a,b);
	 Min=min(Min,c);
     Max=pow(Max,2.0);
     Min=pow(Min,2.0);
    ans=sqrt((Max-Min));
    if(ans==a||ans==b||ans==c)array.push_back(0);	
    else array.push_back(1);
	i++;
    }
  i=0;
  while(i<array.size())
    {
	d=array[i];
	if(!d) cout<<"YES"<<endl;
	else cout<<"NO"<<endl;	
	i++;
    }
  array.clear();
}

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

using namespace std;

#define rep(i,n) for(int i = 0; i < n; i++)
#define REP(i,j,n) for(int i = j; i < n; i++)


int main(){

	int N;
	cin >> N;
	vector<double> data(N);

	rep(i,N){
		rep(j,3){
			cin >> data[j];
		}

		sort(data.begin(),data.end());

		if(pow(data[2],2) == pow(data[0],2) + pow(data[1],2)){
			cout << "YES" << endl;
		}
		else{
			cout << "NO" << endl;
		}

	}

	return 0;
}

C++: 
#include <iostream>

int main(int argc, const char * argv[]) {
    
    int n ;
    std::cin >> n ;
    
    for (int i=0; i<n; i++) {
        int a, b, c ;
        std::cin >> a >> b >> c ;
        if (a*a + b*b == c*c ||
            b*b + c*c == a*a ||
            c*c + a*a == b*b ) {
            printf("YES\n") ;
        } else {
            printf("NO\n") ;
        }
    }
    
    return 0;
}

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

int main(){
  int num[3],c;
  cin >> c;
  for(int j=0; j<c;j++){
    for(int i=0; i<3;i++){
    cin >> num[i];
    }

  sort(num,num+3);
  if(pow(num[0],2)+pow(num[1],2)==pow(num[2],2))
    cout << "YES" <<endl;
  else
    cout <<"NO" << endl;
  }
}

C++: #include <iostream>
#include <cmath>
#define REP(i,n) for(int i=0;i<n;i++)
using namespace std;

int main()
{
    int a,b,c;
    int N;
    cin >> N;
    REP(i,N) {
        cin >> a >> b >> c;
        if (a*a+b*b=c*c) cout << "YES" << endl;
        else cout << "NO" << endl;
    }
    return 0;
}

C++: #include<iostream>
#include<math.h>
using namespace std;
void 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<iostream>
#include<algorithm>
using namespace std;
int main(){
	int n;
	cin >> n;
	for(int i = 0; i < n; i++){
		int l[3];
		cin >> l[0] >> l[1] >> l[2];
		sort(l,l+3);
		
		if(l[2]*l[2] == l[1]*l[1] + l[0]*l[0])
			cout << "Yes" << endl;
		else
			cout << "No" << endl;
	}
      return 0;
}

C++: #include <iostream>
using namespace std;
int main() {
  int n;
  while(cin >> n) {
    for (int i = 0; i < n; ++i) {
      int x, y, z;
      cin >> x >> y >> z;
      if (x < y + z && y < z + x && z < x + y) {
        cout << "YES" << endl;
      } else {
        cout << "NO" << endl;
      }
    }
  }
  return 0;
}