Go: package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
	"sort"
	"strconv"
	"strings"
)

func sliceAtof64(sa []string) ([]float64, error) {
	si := make([]float64, 0, len(sa))
	for _, a := range sa {
		i, err := strconv.ParseFloat(a, 64)
		if err != nil {
			return si, err
		}
		si = append(si, i)
	}
	return si, nil
}

func answer(ans bool) {
	if ans {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}
func isRightTriangle(ary []float64) (ans bool) {
	sort.Sort(sort.Reverse(sort.Float64Slice(ary)))
	ans = math.Pow(ary[1], 2.0)+math.Pow(ary[2], 2.0) == math.Pow(ary[0], 2.0)

	return
}

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	lineCount, _ := strconv.Atoi(scanner.Text())
	lines := make([]string, lineCount)

	for i := 0; i < lineCount; i++ {
		scanner.Scan()
		lines[i] = scanner.Text()
	}

	for _, v := range lines {
		ary, _ := sliceAtof64(strings.Split(v, " "))
		answer(isRightTriangle(ary))
	}
}

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;
}

C++: #include <cmath>
#include <ctime>
#include <algorithm>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <sstream>
#include <string>
#include <vector>
#include <list>
#include <deque>
#include <stack>
#include <bitset>
#include <functional>
#include <numeric>
#include <utility>
#include <iomanip>
#include <cstdio>
#include <cctype>
#include <queue>
#include <complex>
#include <climits>

typedef long long ll;

using namespace std;

int main(void){
	int n;
	cin >> n;
	for(int j=0; j<n; ++j){
		int len[3];
		for(int i=0; i<3; ++i){
			cin >> len[i];
		}

		sort(len, len+3);

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



	return 0;
}

C++: #include<stdio.h>

int main(void)
{
	int i;
	int x[1000]={0},y[1000]={0},z[1000]={0},hantei[1000];
	int j=0,e=0;

	scanf("%d",&i);

	while(j!=i)
	{
		scanf("%d %d %d",&x[j],&y[j],&z[j]);

		j=j+1;
	}

	for(i=0;i<j;i++)
	{
		if(y[i]<x[i] && z[i]<x[i])
		{
			if(x[i]*x[i] == y[i]*y[i]+z[i]*z[i])
				hantei[i]=1;
			else
				hantei[i]=0;
		}
		else if(x[i]<y[i] && z[i]<y[i])
		{
			if(y[i]*y[i] == x[i]*x[i]+z[i]*z[i])
				hantei[i]=1;
			else
				hantei[i]=0;
		}
		else
		{
			if(z[i]*z[i] == x[i]*x[i]+y[i]*y[i])
				hantei[i]=1;
			else
				hantei[i]=0;
		}
	}
	for(i=0;i<j;i++)
	  {   
	   switch(hantei[i])
	    {
		   case 0:
			  printf("NO\n");
			  break;
		   case 1:
			  printf("YES\n");
		      break;
		   default:
			   break;
	   }
	}

	return 0;
}