Go: package main

import (
  "fmt"
)


func main() {
  var a int
  var b int
  var c int
  var n int
  fmt.Scan(&n)
  for _, err := fmt.Scan(&a, &b, &c); err == nil; _, err = fmt.Scan(&a, &b, &c) {
    if a*a == b*b+c*c {
      fmt.Println("YES")
    } else if b*b == c*c+a*a {
      fmt.Println("YES")
    } else if c*c == a*a+b*b {
      fmt.Println("YES")
    } else {
      fmt.Println("NO")
    }
  }
}

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


int main(){
	int i;
	int l[3];
	cin >> i;

	while(i>0){
		for(int j=0; j<3; j++){
			cin >> l[j];
		}

		sort(l,l+3);

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

		i--;
	}

	return 0;
}

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;
	}

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