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<cstdio>
#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
    int n;
    cin>>n;
    while(n--)
    {
        int a[3];
        for(int i=0;i<3;i++)
            cin>>a[i];
        sort(a,a+3);
        if(a[2]*a[2]==a[0]*a[0]+a[1]*a[1])
            printf("YES\n");
        else
            printf("NO\n");
    }
}

C++: //-------------
//include
//-------------
#include <map>
#include <list>
#include <cmath>
#include <vector>
#include <string>
#include <cctype>
#include <cstdlib>
#include <iostream>
#include <algorithm>
using namespace std;
//-------------
//typedef
//-------------
typedef  long long LL;
typedef  vector<int> VI;
typedef  vector<double> VD;
typedef  string STR;
typedef  pair<int, int> PII;
typedef  vector<int, int> VII;
typedef  map<string, int> MSI;
//-------------
//utillty
//-------------
#define ALL(a)  (a).begin(),(a).end()
#define MK make_pair
#define PB push_back
#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 SORT(c) sort((c).begin(),(c).end())
#define COUT(a) cout<<a<<endl
#define POW2(a) pow(a, 2.0)
//-------------
//repetition
//-------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
//-------------
//debug
//-------------
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define dumpl(c) REP(i,SZ(c))cerr<<#c<<i<<"="<<(c[i])<<endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

const int MOD = 1000000007;
int main()
{
	int x;
	cin >> x;
	REP(i,x)
	{
		VD tri;
		REP(i, 3)
		{
			double temp;
			tri.push_back(temp);
		}
		SORT(tri);
		if (POW2(tri[2]) == sqrt(POW2(tri[0]) + POW2(tri[1])))
		{
			COUT("YES");
		}
		else
		{
			COUT("NO");
		}
	}
	
#ifdef _DEBUG
	while(1);
#endif // _DEBUG

	return 0;
}

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

int main(){

int i,j,d,n1,n2,n3,k,temp;



   cout << "データセットの数を入力してください。(データセットの数 <= 1000):";
   cin >> d;
   while(d <= 0 or d >= 1000){
       cout << "データセットの数 <= 1000を満たしておりません。もう一度入力してください。\n";  
       cout << "データセットの数を入力してください。(データセットの数 <= 1000):";
       cin >> d;
   }
 

 
 int l[d][3];
 

//入力
for(i=0; i<d; i++){
   cout << "3辺の長さを入力してください。(辺の長さは1以上1000以下)";
   cin >> n1 >> n2 >> n3;
   
   if(n1 >= 1 and n1 <= 1000 and n2 >= 1 and n2 <=1000 and n3 >= 1 and n3 <= 1000){
       l[i][0]=n1;
       l[i][1]=n2;
       l[i][2]=n3;
        for (k = 0; k < 2; k++) {
        for (j = 2; j > k; j--) {
            if (l[j - 1] > l[j]) {  
                temp = l[i][j];  
                l[i][j] = l[i][j - 1];
                l[i][j - 1] = temp;
            }
        }
    }
   }else{
   cout << "入力した整数が条件をを満たしておりません。もう一度入力してください。\n";
   i--;
   }
}

    
//出力
cout << "result\n";
for (i = 0; i < d; i++) {
    if(l[i][2]*l[i][2] == (l[i][1]*l[i][1]+l[i][0]*l[i][0])){
    cout << "YES\n";
    }else{
    cout << "NO\n";
    }
}

    return 0;
}

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

int main(){
	int n;
	cin >> n;
	for(int i=0; i<n; i++){
		int e[3];
		cin >> e[0] >> e[1] >> e[2];
		sort(e, e+3);
		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 <algorithm>
#include <math.h>

using namespace std;

int main()
{
	int set = 0, s[1001][3];

	cin >> set;
	for(int i = 0; i < set; i++){
		cin >> s[i][0] >> s[i][1] >> s[i][2];
	}

	for(int i = 0; i < set; i++){

		sort(s[i] , s[i] + 3);

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

	return 0;
}

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

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

  return 0;
}

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

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

C++: #include <iostream>
using namespace std;
int main(){
    int a,x,y,z;
    cin >> a;
    int m[3][a];
    for (int i=0;i<a;i++){
        cin >> x >> y >> z ;
        m[0][i] = x;
        m[1][i] = y;
        m[2][i] = z;
    }
    for (int j=0;j<a;j++){
        if (m[0][j]^2+m[1][j]^2!=m[2][j]^2 && m[0][j]^2+m[2][j]^2!=m[1][j]^2 && m[1][j]^2+m[2][j]^2!=m[0][j]^2)
            cout << "NO" << endl;
        else
            cout << "YES" << endl;
    }
}

C++: #define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cstring>
#include <algorithm>
#include <limits.h>
#include <cmath>
#include <time.h>
#define REP(i,a,b) for(i=a;i<b;i++)
#define rep(i,n) REP(i,0,n)
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
#define SQR(X) ((X)*(X))
int test = 0;
/* ここからが本編 */
int main(void)
{
  int i,j,k,l;
  int a[3];
  int n;
  cin >> n;
  while(cin >> a[0] >> a[1] >> a[2]) {
    sort(a,a+3);
    if(SQR(a[0]) + SQR(a[1]) == SQR(a[2])) {
      puts("YES");
    }
    else puts("NO");
  }

  return 0;
}

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

	}
	
	
	

	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;

 for(int i=0; i<n; i++){
  if(a*a == b*b + c*c | b*b == a*a + c*c | c*c == a*a + b*b) cout << "YES\n";
  else cout << "NO\n";
 }

 return 0;
}

C++: #include<iostream>
#include<math.h>
#include<string>
using namespace std;
string heihou(double a, double b, double c)
{
	if (pow(a, 2.0) == pow(b, 2.0) + pow(c, 2.0) || pow(b, 2.0) == pow(a, 2.0) + pow(c, 2.0) || pow(c, 2.0) == pow(b, 2.0) + pow(a, 2.0)){
		return "YES";
	}
	else{
		return "NO";
	}
}
int main()
{
	double dataset[999][2];
	int i = 0;
	int l;
	cin >> l;
	while (i<l){
		cin >> dataset[i][0] >> dataset[i][1] >> dataset[i][2];
		i++;
	}
	for (int j = 0; j < i; j++){
		cout << heihou(dataset[j][0], dataset[j][1], dataset[j][2]) << endl;
	}
	return 0;
}