Go: package main

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

var (
	sc = bufio.NewScanner(os.Stdin)
)

func main() {
	sc.Scan()
	n, _ := strconv.Atoi(sc.Text())
	for i := 0; i < n; i++ {
		sc.Scan()
		edges := make([]int, 3, 3)
		for i, c := range strings.Split(sc.Text(), " ") {
			edges[i], _ = strconv.Atoi(c)
			edges[i] = int(math.Pow(float64(edges[i]), 2))
		}
		sort.IntSlice(edges).Sort()
		msg := "NO"
		if edges[2] == edges[0]+edges[1] {
			msg = "YES"
		}
		fmt.Println(msg)
	}
}

C++: //-------------
//include
//-------------
#include <map>
#include <list>
#include <cmath>
#include <vector>
#include <string>
#include <cctype>
#include <cstdlib>
#include <iostream>
#include <algorithm>
using namespace std;
//-------------
//typedef
//-------------
typedef  long long LL;
typedef  vector<int> VI;
typedef  vector<double> VD;
typedef  string STR;
typedef  pair<int, int> PII;
typedef  vector<int, int> VII;
typedef  map<string, int> MSI;
//-------------
//utillty
//-------------
#define ALL(a)  (a).begin(),(a).end()
#define MK make_pair
#define PB push_back
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define COUT(a) cout<<a<<endl
#define POW2(a) pow(a, 2.0)
//-------------
//repetition
//-------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
//-------------
//debug
//-------------
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define dumpl(c) REP(i,SZ(c))cerr<<#c<<i<<"="<<(c[i])<<endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

const int MOD = 1000000007;
int main()
{
	int x;
	cin >> x;
	REP(i,x)
	{
		VD tri;
		REP(i, 3)
		{
			double temp;
			tri.push_back(temp);
		}
		SORT(tri);
		if (POW2(tri[2]) == sqrt(POW2(tri[0]) + POW2(tri[1])))
		{
			COUT("YES");
		}
		else
		{
			COUT("NO");
		}
	}
	
#ifdef _DEBUG
	while(1);
#endif // _DEBUG

	return 0;
}

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

int main(){

int i,j,d,n1,n2,n3,k,temp;



   cout << "データセットの数を入力してください。(データセットの数 <= 1000):";
   cin >> d;
   while(d <= 0 or d >= 1000){
       cout << "データセットの数 <= 1000を満たしておりません。もう一度入力してください。\n";  
       cout << "データセットの数を入力してください。(データセットの数 <= 1000):";
       cin >> d;
   }
 

 
 int l[d][3];
 

//入力
for(i=0; i<d; i++){
   cout << "3辺の長さを入力してください。(辺の長さは1以上1000以下)";
   cin >> n1 >> n2 >> n3;
   
   if(n1 >= 1 and n1 <= 1000 and n2 >= 1 and n2 <=1000 and n3 >= 1 and n3 <= 1000){
       l[i][0]=n1;
       l[i][1]=n2;
       l[i][2]=n3;
        for (k = 0; k < 2; k++) {
        for (j = 2; j > k; j--) {
            if (l[j - 1] > l[j]) {  
                temp = l[i][j];  
                l[i][j] = l[i][j - 1];
                l[i][j - 1] = temp;
            }
        }
    }
   }else{
   cout << "入力した整数が条件をを満たしておりません。もう一度入力してください。\n";
   i--;
   }
}

    
//出力
cout << "result\n";
for (i = 0; i < d; i++) {
    if(l[i][2]*l[i][2] == (l[i][1]*l[i][1]+l[i][0]*l[i][0])){
    cout << "YES\n";
    }else{
    cout << "NO\n";
    }
}

    return 0;
}

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

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

C++: #include <iostream>
#include <algorithm>
#include <math.h>

using namespace std;

int main()
{
	int set = 0, s[1001][3];

	cin >> set;
	for(int i = 0; i < set; i++){
		cin >> s[i][0] >> s[i][1] >> s[i][2];
	}

	for(int i = 0; i < set; i++){

		sort(s[i] , s[i] + 3);

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

	return 0;
}

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

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

  return 0;
}

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

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

C++: #include <iostream>
using namespace std;
int main(){
    int a,x,y,z;
    cin >> a;
    int m[3][a];
    for (int i=0;i<a;i++){
        cin >> x >> y >> z ;
        m[0][i] = x;
        m[1][i] = y;
        m[2][i] = z;
    }
    for (int j=0;j<a;j++){
        if (m[0][j]^2+m[1][j]^2!=m[2][j]^2 && m[0][j]^2+m[2][j]^2!=m[1][j]^2 && m[1][j]^2+m[2][j]^2!=m[0][j]^2)
            cout << "NO" << endl;
        else
            cout << "YES" << endl;
    }
}

C++: #define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cstring>
#include <algorithm>
#include <limits.h>
#include <cmath>
#include <time.h>
#define REP(i,a,b) for(i=a;i<b;i++)
#define rep(i,n) REP(i,0,n)
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
#define SQR(X) ((X)*(X))
int test = 0;
/* ここからが本編 */
int main(void)
{
  int i,j,k,l;
  int a[3];
  int n;
  cin >> n;
  while(cin >> a[0] >> a[1] >> a[2]) {
    sort(a,a+3);
    if(SQR(a[0]) + SQR(a[1]) == SQR(a[2])) {
      puts("YES");
    }
    else puts("NO");
  }

  return 0;
}

C++: #include<iostream>
#include<cstdio>
#include<stdio.h>
#include<string>
using namespace std;
int main() {
	long judge[1000],i,n,a[1000],b[1000],c[1000];

	cin >> n;
	for (i = 0; i < n; i++) {
		cin >> a[i] >> b[i] >> c[i];
		if (a[i]*a[i] + b[i]*b[i] == c[i]*c[i] || a[i]*a[i]+c[i]+c[i]==b[i]*b[i]||b[i]*b[i]+c[i]*c[i]==a[i]*a[i]) {
			judge[i] = true;
			cout << "YES" << endl;
		}
		else {
			judge[i] = false;
			cout << "NO" << endl;
		}

	}
	
	
	

	return 0;
}

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

int main()
{
 int n;
 int a, b, c;

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

 for(int i=0; i<n; i++){
  if(a*a == b*b + c*c | b*b == a*a + c*c | c*c == a*a + b*b) cout << "YES\n";
  else cout << "NO\n";
 }

 return 0;
}

C++: #include<iostream>
#include<math.h>
#include<string>
using namespace std;
string heihou(double a, double b, double c)
{
	if (pow(a, 2.0) == pow(b, 2.0) + pow(c, 2.0) || pow(b, 2.0) == pow(a, 2.0) + pow(c, 2.0) || pow(c, 2.0) == pow(b, 2.0) + pow(a, 2.0)){
		return "YES";
	}
	else{
		return "NO";
	}
}
int main()
{
	double dataset[999][2];
	int i = 0;
	int l;
	cin >> l;
	while (i<l){
		cin >> dataset[i][0] >> dataset[i][1] >> dataset[i][2];
		i++;
	}
	for (int j = 0; j < i; j++){
		cout << heihou(dataset[j][0], dataset[j][1], dataset[j][2]) << endl;
	}
	return 0;
}

C++: #include <iostream>
#include <sstream>

int main()
{
        unsigned int count=0;
        std::cin>>count;
        std::string* res;
        res=new std::string [count+1];
        for(unsigned int i=0;i<=count;i++)
        {
                std::string str;
                getline(std::cin,str);
                unsigned int a,b,c;
                std::stringstream s(str);
                s>>a>>b>>c;
                if((a*a==b*b+c*c)||(b*b==a*a+c*c)||(c*c==a*a+b*b))
                        res[i]="YES";
                else
                        res[i]="NO";
        }
        for(unsigned int i=1;i<=count;i++)
                std::cout<<res[i]<<std::endl;
        return 0;
}