Go: package main

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

func main() {
	n, err := strconv.Atoi(strScan())
	if err != nil {
		fmt.Println("数字を入力して下さい。")
	} else {
		var counter int = n
		var judgeArr []string
		scanner := bufio.NewScanner(os.Stdin)
		for scanner.Scan() {
			strArr := strings.Fields(scanner.Text())
			castNumArr := StringToInt(strArr)
			judgeArr = append(judgeArr, checkTriangle(castNumArr))
			counter--
			if counter == 0 {
				break
			}
		}
		for _, v := range judgeArr {
			fmt.Println(v)
		}
	}
}

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

func StringToInt(s []string) []int {
	var i []int
	for _, v := range s {
		castNum, err := strconv.Atoi(v)
		if err != nil {
			panic(err)
		}
		i = append(i, castNum)
	}
	return i
}

func strScan() (stringInput string) {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	stringInput = scanner.Text()
	return
}

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

int main(){
	int edge[3];	// ??\????????????
	int max = 0;	// ???????????§???????????????????????????
	int sum = 0;	// ??????????????????
	int i;

	while(true){
	// input 3 edges.
	for( i=0; i < 3 ; ){
		if( !(cin >> edge[i]) )	return 0;	// ??\???????¶????????????£?????????????????´??????
		// ?????¶ : 0 <= ???????????? <= 1000
		if(edge[i] < 0  ||  edge[i] > 1000){
			continue;
		}
		i++;
	}

	// ?????????????????§????????????
	for(i=1,max=0;i<3;i++){
		if(edge[i] > edge[max]){	max = i;    }
	}
        
	// ??????????????????????±??????????
	for(i=0,sum=0 ;i<3;i++){
        if(i != max){	sum += edge[i] * edge[i];   }
		}
        
	// output
	if(edge[max] * edge[max] == sum){	cout << "YES\n";	}
	else{	cout << "NO\n";	}
	}

	return 0;
}

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

int main() {
    
    int length[3];
    int a,b,c;
    
    while(cin >> length[0] >> length[1] >> length[2]) {
        sort(length,length + 3,greater<int>());
        a = length[2] * length[2];
        b = length[1] * length[1];
        c = length[0] * length[0];
        
        if(a + b == c)cout << "YES" << endl;
        else cout<< "NO" << endl;
    }
    return 0;
}

C++: #include <iostream>
#include <algorithm>

using namespace std;

int main()
{
  int a[3];
  int n;

  while(cin>>n){
    while(n--){
      for(int i = 0; i < 3; ++i){ cin >> a[i]; a[i] *= a[i];}
      sort(a, a+3);

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


  return 0;
}

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

// http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0003&lang=jp

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

C++: #include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
int compute(int x) {return x*x;}
int main() {
  int num=0;
  cin>>num;
  for(int i=0;i<num;i++) {
    vector<int> triangle;
    int a,b,c;
    cin>>a>>b>>c;
    triangle.push_back(a);
    triangle.push_back(b);
    triangle.push_back(c);
    sort(triangle.begin(),triangle.end());
    if(compute(triangle[2])==(compute(triangle[0])+compute(triangle[1]))) 
      cout<<"YES";
    else
      cout<<"NO";
    cout<<endl;
  }
  return 0;
}

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

#define REP(i,n) for(int i = 0;i<(int)n;i++)
#define FOR(i,a,b) for(int i = (a);i < (b);i++)
#define RFOR(i,a,b) for(int i = (a);i>(b);i--)

using namespace std;

int main(void){
    
    int number;
    int hen[3];
    int temp;
    cin >> number;
    bool judge[200];
    
    REP(i,number)
    {
        REP(i, 3)
        cin >> hen[i];
        REP(i, 2)
        REP(j, 2)
        {
            if(hen[j] < hen[j+1])
            {
                temp = hen[j+1];
                hen[j+1] = hen[j];
                hen[j] = temp;
            }
        }
        if(hen[0]*hen[0] == (hen[1]*hen[1] + hen[2]*hen[2]))
            judge[i] = true;
        else
            judge[i] = false;
        
    }
    REP(i, number)
    {
        if(judge[i])
            cout << "YES" << endl;
        else
            cout << "NO" << endl;
    }
  
    
    return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <math.h>

using namespace std;

int main(){
	
	int N;
	vector<int> a(3);
	
	cin>>N;
	
	while(N>0){
		for(int i=0;i<3;i++)
			cin>>a[i];
		sort(a.begin(),a.end());
		if(pow(a[2],2.0)==pow(a[1],2.0)+pow(a[0],2.0))
			cout<<"Yes"<<endl;
		else
			cout<<"No"<<endl;
		N--;
	}
	
		
	}

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

int main()
{
	int samples;
	int *lens, i;
	cin >> samples;
	lens = new int[samples*3]();
	for(i = 0; i<samples*3; i+=3)
		cin >> lens[i] >> lens[i+1] >> lens[i+2];
	for(i = 0; i<samples; i++)
	{
		if(lens[i+2]*lens[i+2] == lens[i]*lens[i]+lens[i+1]*lens[i+1])
		{
			cout << "YES" << endl;
		}
		else
			cout << "NO" << endl;
	}
}

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

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

C++: #include<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<string>
#include<vector>
#include<math.h>
#include<queue>
#include <algorithm>
#include<functional>
#include<cstdlib>
#include<cmath>

#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define CI cin >>
#define CO cout <<
#define E << endl;

using namespace std;

typedef pair<int, int> P;
typedef pair<long, long> LP;
typedef pair<int, P> PP;
typedef pair<long, LP> LPP;



int dy[] = { 0, 0, 1, -1, 0 };
int dx[] = { 1, -1, 0, 0, 0 };

int A = 0, B = 0, K = 0, T = 0, W = 0, N = 0, H = 0;
int n = 0;
double L = 0;
double S = 0;
double ar = 0, br = 0, cr = 0;
int answer = 0;

string C;
string sA, strB;
vector<vector<char>> map;
vector<double> num;
vector<string> str;

int sum = 0;

vector<int> value;
vector<int> weight;

int dp[110][10010];

int data_[210][2] = {-2};

void input() {
	CI N;

	

	return;
}


int main(void) {
	input();
	
	int a = 0;
	int b = 0;
	int c = 0;
	int max = 0;
	int other1 = 0;
	int other2 = 0;

	for (int i = 0; i < N; i++) {
		CI a >> b >> c;
		if (a > max) {
			max = a;
			other1 = b;
			other2 = c;
		}
		if (b > max) {
				max = b;
				other1 = a;
				other2 = c;
		}
		
		if (c > max) {
			max = c;
			other1 = a;
			other2 = b;
		}
			
		

		if (other1 * other1 + other2 * other2 == max * max) {
			CO "YES" E
		}
		else {
			CO "NO" E
		}

		


	}


	return 0;
}

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

long int l[1000][3];

void swap(int a, int b, int c){
	int buf = l[c][a];
	l[c][a] = l[c][b];
	l[c][b] = buf;
}

//bubble
void sort(int c){
	for(int i = 0; i < 2; i++){
		for(int j = i; j < 2; j++){
			if(l[c][j] > l[c][j+1]) swap(j,j+1,c);	
		}
	}
}

int main(){
int buf;

cin >> buf;

for(int i = 0; i < buf; i++){	
	cin >> l[i][0] >> l[i][1] >> l[i][2];
	sort(i);
}

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

	if(j != buf-1) cout << endl;
}

return 0;
}