Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

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

func main() {
	// sc.Split(bufio.ScanLines)
	sc.Split(bufio.ScanWords)
	n, _ := strconv.Atoi(read())
	s := make([]int, 3)
	for i := 0; i < n; i++ {
		s[0], _ = strconv.Atoi(read())
		s[1], _ = strconv.Atoi(read())
		s[2], _ = strconv.Atoi(read())
		sort.Sort(sort.IntSlice(s))
		if (s[2] * s[2]) == ((s[0] * s[0]) + (s[1] * s[1])) {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

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

C++: #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <sstream>
#include <functional>
#include <numeric>
#include <cmath>
#include <cstring>
#include <queue>
#include <stack>
#include <set>

using namespace std;

#define ALL(co) co.begin(), co.end()

typedef long long LL;
typedef pair<int, int> P;
typedef pair<P, P> PP;
typedef vector<int> Array;
typedef vector<int> LArray;

const int INF = 1 << 29;
const LL LINF = 1LL << 60;

int itiv;
inline int getInt() { return (cin >> itiv, itiv); }
void readAll(Array& vec, int n) { for (int i = 0; i < n; i++) cin >> vec[i]; }
inline bool between(int first, int last, int n) { return first <= n && n <= last; }
inline bool inRange(int begin, int end, int n) { return begin <= n && n < end; }
inline bool inRange(int size, int n) { return 0 <= n && n < size; }

int m, n;
int dx[] = { -1, 0, 1, 0 }, dy[] = { 0, -1, 0, 1 };
int dr[] = { 0, -1, 0, 1 }, dc[] = { -1, 0, 1, 0 };


int main(void)
{
	while(cin >> n && n)
	{
		for (int i = 0; i < n; i++)
		{
			vector<int> arr(3);
			readAll(arr, 3);
			sort(ALL(arr));
			cout << (arr[2] * arr[2] == arr[0] * arr[0] + arr[1] * arr[1] ? "YES" : "NO") << endl;
		}
	}
	return 0;
}

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

#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define in(x) cin >> x
#define out(str) cout << str << endl

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

int N;

int main(){
    cin>>N;
    int a[N][3];
    rep(i,N){
        rep(j,3){
            cin>>a[i][j];
        }
    }
    rep(i,N){
        sort(a[i],a[i]+3);
        if(pow(a[i][0],2)+pow(a[i][1],2)==pow(a[i][2],2)){
            out("Yes");
        }
        else{
            out("No");
        }
    }
}

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

int N,a,b,c;

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