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 <iostream>
#include <algorithm>
using namespace std;

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

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

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

C++: #include <stdio.h>

int main(void)
{
	int dsnum,length[3],i;
	
	scanf("%d",&dsnum);
	
	while(dsnum>0)
	{
		scanf("%d%d%d",&length[0],&length[1],&length[2]);
		
		for(i=0;i<3;i++)
		{
			if(length[i]*length[i]+length[(i+1)%3]*length[(i+1)%3]==length[(i+2)%3]*length[(i+2)%3])
			{
				printf("YES\n");
				break;
			}
			if(i==2) printf("NO\n");
		}
		dsnum--;
	}
	return 0;
}

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

bool solve(int x,int y,int z) ;

bool ans = false ;

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

	bool ans = false ;

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

		if( a > b )
		{
			if( a > c )		// 最大値はa
			{
				ans = solve(a,b,c) ;
			}
			else if( a < c )	// 最大値はc
			{
				ans = solve(c,a,b) ;
			}
		}
		else if( a < b )
		{
			if( b > c )		// 最大値はb
			{
				ans = solve(b,a,c) ;
			}
			else if( b < c )	// 最大値はc
			{
				ans = solve(c,a,b) ;
			}
		}

		if( ans == true ){ cout << "YES" << "\n" ; }
		else{ cout << "NO" << "\n" ; }
	}
	return 0 ;
}

bool solve(int x,int y, int z)
{
	if( x*x == (y*y + z*z) )
	{
		return true ;
	}
	else
	{
		return false ;
	}
}

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

int main(){

	int set;

	cin >> set;

	int num[set][3];

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

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

    return 0;
}

C++: #define _USE_MATH_DEFINES
#include<iostream>
#include<string>
#include<queue>
#include<cmath>
#include<map>
#include<set>
#include<list>
#include<iomanip>
#include<vector>
#include<random>
#include<functional>
#include<algorithm>
#include<stack>
#include<cstdio>
#include<bitset>
#include<unordered_map>
#include<climits>
#include<fstream>
using namespace std;
///////////////////library zone!!!!!!!!!!!!!!!!!!!!!!!!!!!!
typedef long long ll;
typedef long double ld;
#define all(a) (a).begin(),(a).end()
const ll Mod = 1000000007;
const ll mod = 998244353;
struct H {
	ll x, y;
	bool operator<(const H &b) const {
		if (x != b.x) return x < b.x;
		return y < b.y;
	}
	bool operator>(const H &b) const {
		if (x != b.x) return x > b.x;
		return y > b.y;
	}
	bool operator==(const H &b) const { return x == b.x&&y == b.y; }
	bool operator!=(const H &b) const { return (*this) != b; }
};
struct P {
	ll pos, cost;
	bool operator<(const P &b) const { return cost < b.cost; }
	bool operator>(const P &b) const { return cost > b.cost; }
};
struct B {
	ll to, cost;
};
struct E {
	ll from, to, cost;
	bool operator<(const E &b) const { return cost < b.cost; }
	bool operator>(const E &b) const { return cost > b.cost; }
};
template<typename T, typename U>
void chmin(T &a, U b) {
	if (a > b) a = b;
}
template<typename T, typename U>
void chmax(T &a, U b) {
	if (a < b) a = b;
}
template<typename T>
T max_0(T a) {
	if (a < 0) return 0;
	return a;
}
template<typename T>
T min_0(T a) {
	if (a > 0) return 0;
	return a;
}
ll read() {
	ll u;
	ll k = scanf("%lld", &u);
	return u;
}
ll gcd(ll i, ll j) {
	if (i > j) swap(i, j);
	if (i == 0) return j;
	return gcd(j%i, i);
}
ll mod_pow(ll x, ll n, ll p) {
	ll res = 1;
	while (n > 0) {
		if (n & 1) res = res * x % p;
		x = x * x % p;
		n >>= 1;
	}
	return res;
}//x^n%p
const ll Inf = 3023372036854775807;
const int inf = 1500000000;
#define int long long
//----------------------------------------------------
	int a[3];
	int n;
signed main() {
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> a[0] >> a[1] >> a[2];
		sort(a, a + 3);
		if (a[0] * a[0] + a[1] * a[1] == a[2] * a[2]) {
			cout << "YES\n";
		}
		else {
			cout << "NO\n";
		}
	}
}

C++: #include<bits/stdc++.h>
using namespace std;
 
signed main(){
 int a;
 int b[3];
 for(int c=0;c<3;c++)scanf("%d",&b[c]);
 sort(b,b+3);
 if(b[0]*b[0]+b[1]*b[1]==b[2]*b[2])printf("YES\n");
 else printf("NO\n");
}

C++: /*http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0003&lang=jp*/

#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main(){
    int n;

    cin>>n;
    for (int i = 0; i < n; ++i) {
        vector<int> lens;
        for (int j = 0; j < 3; ++j) {
            int tmp;
            cin>>tmp;
            lens.push_back(tmp);
        }
        sort(lens.begin(),lens.end(),greater<int>());
        if(pow(lens[0],2)==pow(lens[1],2)+pow(lens[2],2)){
            cout<<"YES"<<endl;
        }else{
            cout<<"NO"<<endl;
        }
    }
    return 0;
}

C++: #include <iostream>

using namespace std;
int loop;
int panjang[1000][3];
int y = 0;
int temp;
int main()
{
 cin >> loop;
for(int x=0;x<loop;x++)
{
        cin >> panjang[x][y] >> panjang[x][y+1] >> panjang[x][y+2];
        if(panjang[x][y]>1000||panjang[x][y]<1||panjang[x][y+1]>1000||panjang[x][y+1]<1||panjang[x][y+2]>1000||panjang[x][y+2]<1)
            return 0;
}
for(int looper= 0;looper<loop;looper++)
{
    for(int looper2 = 0;looper2<5;looper2++)
{
    if((panjang[looper][y])<(panjang[looper][y+1]))
    {
        temp = panjang[looper][y];
        panjang[looper][y]=panjang[looper][y+1];
        panjang[looper][y+1]=temp;
        temp = 0;
            if((panjang[looper][y+1]<(panjang[looper][y+2])))
    {
        temp = panjang[looper][y+1];
        panjang[looper][y+1]=panjang[looper][y+2];
        panjang[looper][y+2]=temp;
        temp = 0;

    }

    }
}
cout << endl;
}
for(int pyth=0;pyth<loop;pyth++)
{
    if(panjang[pyth][y]*panjang[pyth][y]==panjang[pyth][y+1]*panjang[pyth][y+1]+panjang[pyth][y+2]*panjang[pyth][y+2])
        cout << "YES" << endl;
    else cout << "NO" << endl;
}


}

C++: #include<stdio.h>
void temp(int x,int y,int z)
{
int tmp;
if(x<y){tmp=y;y=x;x=tmp;}
if(x<z){tmp=x;x=z;z=tmp;}
if(y<z){tmp=z;z=y;y=tmp;}
}
int main()
{
int x,y,z.n;
scanf("%d",&n);
while(n-->=0)
{
scanf("%d",&x);scanf("%d",&y);scanf("%d",&z);

temp(x,y,z);
if(x*x=y*y+z*z)printf("YES\n");
else printf("NO\n");


}
return 0;
}