Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

func main() {
	n, _ := strconv.Atoi(strScan())
	scanner := bufio.NewScanner(os.Stdin)
	for i := 0; i < n; i++ {
		scanner.Scan()
		strArr := strings.Fields(scanner.Text())
		castNumArr := StringToInt(strArr)
		fmt.Println(checkTriangle(castNumArr))
	}
}

func checkTriangle(i []int) string {
	if checkSt(i[0], i[1], i[2]) || checkSt(i[1], i[2], i[0]) || checkSt(i[2], i[0], i[1]) {
		return "YES"
	} else {
		return "NO"
	}
}

func Sq(x int) int {
	return x * x
}

func checkSt(a, b, c int) bool {
	return (Sq(a) + Sq(b)) == Sq(c)

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

C++: #include <iostream>
bool Check(int length[3]);

int main(void)
{
    int dataCount;
    std::cin >> dataCount;
    while(dataCount--){
        int length[3];
        std::cin >> length[0] >> length[1] >> length[2];
        std::cout << (Check(length) ? "YES" : "NO") << std::endl;
    }
    return 0;
}

bool Check(int length[3])
{
    int z = length[0] > length[1] ? (length[0] > length[2] ? 0 : 2) : (length[1] > length[2] ? 1 : 2);
    int buffer = 0;
    for(int i=0;i < 3;++i){
        if(i != z){
            buffer += length[i] * length[i];
        }
    }
    return buffer == length[z] * length[z];
}

C++: #include <iostream>
using namespace std;
int main(){
	int a,b,c,N;
	cin>>N;
	for(int i=1;i<=N; i++){
		cin>>a>>b>>c;
		if(a*a+b*b==c*c){
			cout<<"Yes"<<endl;
		}else{
			cout<<"No"<<endl;
		}
	}

}