Go: package main

import (
	"fmt"
)

func main() {
	lines := [3]int{}
	var round int
	fmt.Scan(&round)
	for r := 0; r < round; r++ {
		fmt.Scan(&lines[0], &lines[1], &lines[2])

		if lines[0] > lines[1] && lines[0] > lines[2] {

		} else if lines[2] > lines[1] {
			tmp := lines[0]
			lines[0] = lines[2]
			lines[2] = tmp
		} else {
			tmp := lines[0]
			lines[0] = lines[1]
			lines[1] = tmp
		}

		if lines[1]*lines[1]+lines[2]*lines[2] == lines[0]*lines[0] {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

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

int main(){
	int N;
	cin >> N;
	string line;
	cout << endl;
	for (int i = 0; i < N; i++){
		getline(cin, line);
		stringstream lineStream(line);
		int a, b, c;
		lineStream >> a >> b >> c;
		int a_two = pow(a, 2);
		int b_two = pow(b, 2);
		int c_two = pow(c, 2);
		if ((a_two + b_two == c_two) || (b_two + c_two == a_two) || (c_two + a_two == b_two)){
			cout << "YES" << endl;
		}
		else{
			cout << "NO" << endl;
		}
	}
    return 0;
}

C++: #include <iostream>
#include <math.h>
using namespace std;
void solve(int a, int b, int c) {
    bool f = false;
    int max_num = max(a, max(b, c));
    int sub1, sub2;
    if (max_num != a) {
        sub1 = a;
        if (max_num != b) sub2 = b;
        else sub2 = c;
    } else if (max_num != b) {
        sub1 = b;
        sub2 = c;
    }         
    if (pow(max_num, 2) == pow(sub1, 2) + pow(sub2, 2)) f = true;
    if (f) cout << "YES" << endl;
    else cout << "NO" << endl;
}
int main() {
    int num, a, b, c;
    cin >> num;
    for (int i=0; i<num; i++) {
        cin >> a >> b >> c;
        solve(a,b,c);
    }
    return 0;
}

C++: #include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
int main(){
  int num[3],n;
  cin >> n;
  for(int i= 0;i<n;i++){
    cin >> num[0] >> num[1] >> num[2];
    sort(num,num+3);
    if((num[1] * num[1]) + (num[0] * num[0]) == num[2] * num[2]){
      cout << "YES" << endl;
    }else{
      cout << "NO" << endl;
    }
    
  }
}

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 = 0;
	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 <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<ll, ll> P;

#define EACH(i,a) for (auto& i : a)
#define FOR(i,a,b) for (ll i=(a);i<(b);i++)
#define RFOR(i,a,b) for (ll i=(b)-1;i>=(a);i--)
#define REP(i,n) for (ll i=0;i<(n);i++)
#define RREP(i,n) for (ll i=(n)-1;i>=0;i--)
#define debug(x) cout<<#x<<": "<<x<<endl
#define pb push_back
#define ALL(a) (a).begin(),(a).end()

const ll linf = 1e18;
const int inf = 1e9;
const double eps = 1e-12;
const double pi = acos(-1);

template<typename T>
istream& operator>>(istream& is, vector<T>& vec) {
	EACH(x,vec) is >> x;
	return is;
}
template<typename T>
ostream& operator<<(ostream& os, vector<T>& vec) {
	REP(i,vec.size()) {
		if (i) os << " ";
		os << vec[i];
	}
	return os;
}
template<typename T>
ostream& operator<<(ostream& os, vector< vector<T> >& vec) {
	REP(i,vec.size()) {
		if (i) os << endl;
		os << vec[i];
	}
	return os;
}

int main() {
	std::ios::sync_with_stdio(false);
	std::cin.tie(0);
	int N; cin >> N;
	REP(t, N) {
		vector<int> v(3); cin >> v;
		sort(ALL(v));
		if (v[0] * v[0] + v[1] * v[1] == v[2] * v[2]) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}
}

C++: #include<stdio.h>
 
main()
{
    int d,e;
 
    scanf("%d",&d); //入力するデータセット数
 
    for(e=0;e<d;e++){
        int a=0,b=0,c=0;
 
        scanf("%d %d %d",&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++: //AOJ0003 Is it a Right Triangle?
#include <stdio.h>

int main(){
	int i,num[3],line;
	scanf("%d",&line);
	for(i = 0; i < line; i++){
		if(scanf("%d %d %d",&num[0],&num[1],&num[2]) == EOF)break;
		if(num[0]^2 == num[1]^2+num[2]^2 || num[1]^2 == num[0]^2+num[2]^2 || num[2]^2 == num[0]^2+num[1]^2)
			printf("YES\n");
		else printf("NO\n");
	}
	return 0;
}

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

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

C++: #include <iostream>
#include <math.h>
#include <algorithm>
using namespace std;
int main(){
	int a,b[3]={0};
	cin>>a;
	for (int A=0;A<a;A++){
		cin>>b[0]>>b[1]>>b[2];
		sort(b,b+3);
		b[0]=pow(b[0],2);
		b[1]=pow(b[1],2);
		b[2]=pow(b[2],2);
		if (b[2]==b[0]+b[1])cout<<"Yes"<<endl;
		else cout<<"NO"<<endl;
	}
	return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <complex>
#include <cmath>
#include <algorithm>
#include <map>
#define shosu(x) fixed<<setprecision(x)
using namespace std;
int main(){
	int num,x,y,z;
	vector<int> tmp1,tmp2,tmp3;
	cin>>num;
	for(int i=0;i<num;i++){
		cin>>x>>y>>z;
		tmp1.push_back(x);
		tmp2.push_back(y);
		tmp3.push_back(z);
	}
	for(int i=0;i<num;i++){
		tmp1[i]*=tmp1[i];
		tmp2[i]*=tmp2[i];
		tmp3[i]*=tmp3[i];
		int high=max(tmp1[i],max(tmp2[i],tmp3[i]));
		int sum=tmp1[i]+tmp2[i]+tmp3[i];
		if(high==sum/2) cout<<"YES"<<endl;
		else cout<<"NO"<<endl;
	}
}

C++: /*
 * http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0003
 */
#include <cmath>
#include <iostream>
#include <sstream>
#include <vector>
#include <algorithm>

using namespace std;

int
main()
{
	string line;
	while (getline(cin, line)) {
		vector<int> sides(3);
		istringstream iss(line);
		for ( int i = 0; i < 3; i++ ) iss >> sides[i];
		sort( sides.begin(), sides.end() );
		int test = pow( sides[0], 2 ) + pow( sides[1], 2 ) - pow( sides[2], 2 );
		cout << ( test == 0 ? "YES" : "NO" ) << endl;
	}
}

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

int main(){
  int N, side1, side2, side3, i;

  scanf("%d", &N);

  for(i = 0; i < N; i++){
    scanf("%d %d %d", &side1, &side2, &side3);
    if(side1 >= side2 && side1 >= side3){
      if(side1 * side1 == side2 * side2 + side3 * side3){
	printf("YES\n");
      }else{
	printf("NO\n");
      }
    }else if(side2 >= side1 && side2 >= side3){
      if(side2 * side2 == side1 * side1 + side3 * side3){
	printf("YES\n");
      }else{
	printf("NO\n");
      }
    }else{
      if(side3 * side3 == side2 * side2 + side1 * side1){
	printf("YES\n");
      }else{
	printf("NO\n");
      }
    }

  }

  return 0;
}

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*a+b*b == c*c)
            cout << "YES" << endl;
        else if (a*a+c*c == b*b)
            cout << "YES" << endl;
        else if (b*b+c*c == a*a)
            cout << "YES" << endl;
        else
            cout << "NO" << endl;
    }
}