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
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <string>
#include <cstring>
#include <ctime>


using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) { int v; istringstream sin(s); sin >> v; return v; }
template<class T> inline string toString(T x) { ostringstream sout; sout << x; return sout.str(); }

//math
//-------------------------------------------
template<class T> inline T sqr(T x) { return x*x; }

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;

//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#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 EXISTch(s,c) ((((s).find_first_of(c)) != std::string::npos)? 1 : 0)//cがあれば1 if(1)
#define SORT(c) sort((c).begin(),(c).end())

//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n)  FOR(i,0,n)
#define loop(n) FOR(i,0,n)
#define rrep(i,a,b) for(int i=(a);i>=(b);--i)
//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI = acos(-1.0);
const int INF = (int)1000000007;
const LL MOD = (LL)1000000007;//10^9+7
const LL INF2 = (LL)100000000000000000;//10^18



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

	for (int i = 0; i < n; i++) {
		vector<int>e(3);
		
		cin >> e[0] >> e[1] >> e[2];

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

		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<vector>
#include<algorithm>
int main(){
  using namespace std;
  int N;
  cin >> N;
  for(int i = 0; i < N; i++){
    vector<int> edge(3);
    for(int j = 0; j < 3; j++){
      cin >> edge[j];
    }
    sort(edge.begin(), edge.end());
    int l,m,s;
    s = edge[0];
    m = edge[1];
    l = edge[2];
    if(l*l == m*m + s*s){
      cout << "YES" << endl;
    }else{
      cout << "NO" << endl;
    }
  }
}

C++: #include <iostream>
using namespace std;
int main(){
    int a,b,c,n;
    cin >> n;
    for (;0<n;n--){
        cin >> a >> b >> c;
        if (a^2+b^2!=c^2 && a^2+c^2!=b^2 && b^2+c^2!=a^2)
            cout << "NO" << endl;
        else
            cout << "YES" << endl;
    }
}

C++: #include <bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;i++)
using namespace std;
typedef long long ll;

int main() {
	int a[3];
	int n; cin >> n;
	rep(i,n) {
		cin >> a[0] >> a[1] >> a[2];
		sort(a, a + 3);
		if (a[2] * a[2] == a[0] * a[0] + a[1] * a[1])puts("YES");
		else puts("NO");
	}
	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;
        if(a*a+b*b==c*c||b*b+c*c==a*a||c*c+a*a==b*b){
            cout << "YES" << endl;
        }else{
             cout << "NO" << endl;
        }
    }
    return 0;
}

C++: #include<stdio.h>

int main(){
 int n,a,b,c,i,aa,bb,cc;

 scanf("%d",&n);
 for(i=0;i<n;i++){
  scanf("%d %d %d",&a,&b,&c);
  aa=a*a;
  bb=b*b;
  cc=c*c;
  if((aa+bb)==cc||
     (cc+bb)==aa||
     (cc+aa)==bb){
   printf("YES\n");
  }else{
   printf("NO\n");
  }
 }
 return 0;
}

C++: #include <iostream>
#include <cstdio> 
#include <cstdlib>
#include <cctype>
#include <cstring>
#include <sstream>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <list>
#include <stack>
#include <queue>
#include <algorithm>
#include <complex>
using namespace std;

typedef pair<int, int> pii;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;

#ifndef typeof
#define typeof __typeof__
#endif // typeof
 
#define all(c) (c).begin(), (c).end()
#define rall(c) (c).rbegin(), (c).rend()
#define tr(c, i) for(typeof((c).begin()) i = (c).begin(); i != (c).end(); i++)
#define rtr(c, i) for(typeof((c).rbegin()) i = (c).rbegin(); i != (c).rend(); i++)
#define repby(i, a, b, step) for(typeof(b) i = (a); i < (b); i += (step))
#define repab(i, a, b) repby(i, (a), (b), 1)
#define rep(i, n) repab(i, 0, (n))
#define pb push_back
#define sz(c) int((c).size())

bool judge(vi &v)
{
  sort(rall(v));

  return v[0]*v[0] == v[1]*v[1] + v[2]*v[2];
}

int main(int argc, char **argv)
{
  int n, x, y, z;
  vi v;

  cin >> n;
  while (n--) {
    cin >> x >> y >> z; 
    v.pb(x);
    v.pb(y);
    v.pb(z);
    cout << (judge(v) ? "YES" : "NO") << endl;
    v.clear();
  }

  return 0;
}

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

#define REP(i,a,b) for(i=a;i<b;i++)
#define rep(i,n) REP(i,0,n)
#define sqr(x) x*x

int main(){
  int n, f = 0;
  int s1, s2, s3;

  scanf("%d",&n);
  while(n--){
    scanf("%d %d %d",&s1,&s2,&s3);
    f = sqr(s1) == sqr(s2) + sqr(s3) ? 1 : 0;
    f = sqr(s2) == sqr(s1) + sqr(s3) ? 1 : 0;
    f = sqr(s3) == sqr(s1) + sqr(s2) ? 1 : 0;

    if(f) puts("YES");
    else puts("NO");
  }

  return 0;
}

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

int main(){
  int a,b,c;
  std::cin>>a;
  std::cin>>b;
  std::cin>>c;
  if      (a*a==b*b+c*c) std::cout<<"YES"<<std::endl;
  else if(b*b==a*a+c*c) std::cout<<"YES"<<std::endl;
  else if(c*c==a*a+b*b) std::cout<<"YES"<<std::endl;
  else std::cout<<"NO"<<std::endl;
  

	
	return 0;
}

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

int main()
{
	int N;

	std::cin >> N;

	std::vector<int> m(3);

	for(int i=0;i<N;++i)
	{
		for(int j=0;j<3;++j)
		{
			std::cin >> m[j];
		}
		std::sort(m.begin(),m.end());

		if(m[2]*m[2]==m[0]*m[0]+m[1]*m[1])
		{
			std::cout << "YES" << '\n';
		}
		else
		{
			std::cout << "NO" << '\n';
		}
	}
}

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]) {
			judge[i] = true;
			cout << "YES" << endl;
		}
		else {
			judge[i] = false;
			cout << "NO" << endl;
		}

	}
	
	
	

	return 0;
}