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>
using namespace std;
#define max(a,b) ((a > b)? a:b)
int main()
{
	int a, b, c, d,i = 0, num;
	cin >> d;
	while (i < d) {
		cin >> a >> b >> c;
		num = max(a, max(b,c));
		if (num == a) {
			if (a * a == b * b + c * c) {
				cout << "YES" << endl; }
			else { cout << "NO" << endl; }
		}
		else if (num == b) {
			if (b * b == a * a + c * c) {
				cout << "YES" << endl;	}
			else { cout << "NO" << endl; }
		}
		else if (num == c) {
			if (c * c == a * a + b * b) {
				cout << "YES" << endl;	}
			else { cout << "NO" << endl; }
		}
		else { cout << "NO" << endl; }
		i++;
	}
    return 0;
}

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

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

C++: #include<stdio.h>
int main(){int n,a,b,c,s;scanf("%d",&n);while(n--){scanf("%d %d %d",&a,&b,&c);if(a>b){s=a;a=b;b=s;}if(b>c){s=b;b=c;c=s;}printf("%s\n",a*a+b*b==c*c?"YES":"NO");}return 0;}

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

using namespace std;

int main(){

int n;
cin>>n;

for(int i=0;i<n;i++){
int tri[3];

cin>>tri[0]>>tri[1]>>tri[2];
sort(tri,tri+3);

if(tri[0]%1==0 && tri[1]%1==0 && tri[2]%2==0) cout<<"YES"<<endl;
else if(tri[0]%1==0 && tri[1]%3==0 && tri[2]%4==0) cout<<"YES"<<endl;
else if(tri[0]%3==0 && tri[1]%4==0 && tri[2]%5==0) cout<<"YES"<<endl;
else if(tri[0]%5==0 && tri[1]%12==0 && tri[2]%13==0) cout<<"YES"<<endl;
else cout<<"NO"<<endl;
}

return 0;

}

C++: 
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <string>
#include <vector>
#include <set>
#include <map>
#define pi 3.14159265358979323846264338
using namespace std;

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

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

int main(int argc, char** argv)
{
    int num;

    cin >> num;
    for (int i = 0; i < num; i++) {
        vector<int> v = vector<int>(3);
        cin >> v[0] >> v[1] >> v[2];
        sort(v.begin(), v.end());
        if (v[0] * v[0] + v[1] * v[1] == v[2] * v[2]) {
            cout << "YES\n";
        } else {
            cout << "NO\n";
        }
    }
    return 0;
}

C++: // Define
#define     ERROR_NUMBER     -1


// Prototype

// 順列検索関数 (find_min_number)
// n個の整数列 inputnumbers の中で一番小さい数字からk番目の整数を返します
// const int *inputnumbers, const unsigned int n, const unsigned int k
int find_min_number(const int *inputnumbers,const unsigned int n,const unsigned int k);

// 順列検索関数 (find_min_number)
// n個の整数列 inputnumbers の中で一番大きい数字からk番目の整数を返します
// const int *inputnumbers, const unsigned int n, const unsigned int k
int find_max_number(const int *inputnumbers,const unsigned int n,const unsigned int k);



// IncludingHeaderFile
#include<iostream>
#include<vector>


// UsingNamespace
using namespace std;


// Functions

// 順列検索関数 (find_min_number)
// n個の整数列 inputnumbers の中で一番小さい数字からk番目の整数を返します
// const int *inputnumbers, const unsigned int n, const unsigned int k
int find_min_number(const int *inputnumbers,const unsigned int n,const unsigned int k){
	int i,j;
	bool flag;
	vector <int> numbers;

	// 引数の誤りをチェック
	if((n < k) || (n <= 0) || (k <= 0)){
		return ((int)ERROR_NUMBER);
	}

	// inputnumbers -> numbers (コピー)
	for(i=0;i < ((int)n);i++){
		numbers.push_back(*(inputnumbers + i));
	}

	// 並び替えのループ
	do{
		flag = false;
		for(i=0;i < (((int)n) - 1);i++){
			if(numbers[i] > numbers[i+1]){
				j = numbers[i];
				numbers[i] = numbers[i+1];
				numbers[i+1] = j;
				flag = true;
			}
		}
	}while(flag == true);

	// 小さいほうからk番目の整数を返す
	return numbers[(k - 1)];
}

// 順列検索関数 (find_min_number)
// n個の整数列 inputnumbers の中で一番大きい数字からk番目の整数を返します
// const int *inputnumbers, const unsigned int n, const unsigned int k
int find_max_number(const int *inputnumbers,const unsigned int n,const unsigned int k){
	int i,j;
	bool flag;
	vector <int> numbers;

	// 引数の誤りをチェック
	if((n < k) || (n <= 0) || (k <= 0)){
		return ((int)ERROR_NUMBER);
	}

	// inputnumbers -> numbers (コピー)
	for(i=0;i < ((int)n);i++){
		numbers.push_back(*(inputnumbers + i));
	}

	// 並び替えのループ
	do{
		flag = false;
		for(i=0;i < (((int)n) - 1);i++){
			if(numbers[i] < numbers[i+1]){
				j = numbers[i];
				numbers[i] = numbers[i+1];
				numbers[i+1] = j;
				flag = true;
			}
		}
	}while(flag == true);

	// 大きいほうからk番目の整数を返す
	return numbers[(k - 1)];
}




#define     MAX_NUMBER     1000
#define     MIN_LENGTH     1
#define     MAX_LENGTH     1000

int main(){
	int n,i;
	int num[3];
	int p,q,r;												// p <= q <= r

	// データ数の入力
	cin >> n;
	if((n <= 0) || (n > ((int)MAX_NUMBER))){
		cerr << "Error : The number is wrong." << endl;
		return -1;
	}

	// データの入力・チェック・並び替え・出力
	for(i=0;i<n;i++){
		// データの入力
		cin >> num[0] >> num[1] >> num[2];
		// データのチェック
		if((num[0] < ((int)MIN_LENGTH)) || (num[0] > ((int)MAX_LENGTH))){
			cerr << "Error : The first number is wrong." << endl;
			return -1;
		}else if((num[1] < ((int)MIN_LENGTH)) || (num[1] > ((int)MAX_LENGTH))){
			cerr << "Error : The first number is wrong." << endl;
			return -1;
		}else if((num[2] < ((int)MIN_LENGTH)) || (num[2] > ((int)MAX_LENGTH))){
			cerr << "Error : The first number is wrong." << endl;
			return -1;
		}
		// データの並び替え
		p = find_min_number(num,3,1);
		q = find_min_number(num,3,2);
		r = find_min_number(num,3,3);
		// 出力
		if(((p * p) + (q * q)) == (r * r)){
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		}
	}

	return 0;
}

C++: //	??´?§?????§???¢ 
#include<iostream>
using namespace std;

int main() {
	int a,b,c,n;
	cin >> n;
	for ( int i=0; i < n; i++ ){
		bool flag = false;
		cin >> a >> b >> c;
		if (a + b > c && a + c > b && b + c > a){
			if ( ((a*a + b*b) == c*c) ||  ((a*a + c*c) == b*b) || ((b*b + c*c) == a*a) ){
				flag = true;
			}
		}
		if (flag) {
			cout << "yes" << endl;
		}else {
			cout << "no" << endl;
		}
	}
}

C++: #include <stdio.h>
#include <algorithm>
using namespace std;
int main(){
	int N;
	int count=0;
	int a[3];
	scanf("%d ",&N);
	while(count!=N){
	for(int i=0;i<3;i++){
		scanf("%d ",&a[i]);
	}
	sort(a,a+3);
	if(a[2]<(a[0]+a[1])){
		printf("YES");
		count++;
	}
	else{
		printf("NO");
		count++;
	}
	}
	return 0;
	}