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>
#include <cmath>
#define REP(i,n) for(int i=0;i<n;i++)
using namespace std;

int main()
{
    int a,b,c,N;
    priority_queue< int, vector<int>, greater<int> > que;
    cin >> N;
    REP(i,N) {
        cin >> a >> b >> c;
        que.push(a);que.push(b);que.push(c);
        c=que.top();
        que.pop();
        b=que.top();
        que.pop();
        a=que.top();
        que.pop();
        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[10000] = { 0 }, b[10000] = { 0 }, c[10000] = { 0 };
	int n;
	int d[10000], e[10000], f[10000], g[10000];
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> a[i] >> b[i] >> c[i];
		d[i] = a[i] * a[i];
		e[i] = b[i] * b[i];
		f[i] = c[i] * c[i];
		g[i] = d[i] + e[i] + f[i];
	}
	for (int j = 0; j < n; j++) {
		if (g[j] == 2*d[j] || g[j] == 2*e[j] || g[j] == 2*f[j]) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}
	return 0;
}

C++: #include <cstdlib>
#include <vector>
#include <math.h>
using namespace std;

int main(){
	vector<vector<int> > a;

	int lines = 0;
	scanf("%d", &lines);

	bool isOk[lines];
	for (int i = 0; i < lines; ++i)
	{
		int l[3];
		for (int j = 0; j < 3; ++j)
			scanf("%d", &l[j]);

		if(pow(l[0], 2.0) + pow(l[1], 2.0) == pow(l[2], 2.0)) isOk[i] = true;
		if(!isOk[i] && pow(l[1], 2.0) + pow(l[2], 2.0) == pow(l[0], 2.0)) isOk[i] = true;
		if(!isOk[i] && pow(l[2], 2.0) + pow(l[0], 2.0) == pow(l[1], 2.0)) isOk[i] = true;
	}

	for (int i = 0; i < lines; ++i)
	{
		if(isOk[i]) printf("YES\n");
		else printf("NO\n");
	}
}

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

int pow(int i){return i*i;}

int main(){
    int num;
    cin >> num;
    int a[3];
    for(int i=0;i<num;i++){
        cin >> a[0] >> a[1] >> a[2];
        sort(a,a+3,greater<int>());
        if(pow(a[0])==pow(a[1])+pow(a[2]))cout << "YES" << endl;
        else cout << "NO" << endl;
    }
    return 0;
}

C++: #include <bits/stdc++.h>
#define LL long long
#define ULL unsigned long long
#define rep(i, n) for (int i=0; i<(n); i++)
#define rep2(i, x, n) for (int i=x; i<(n); i++)
using namespace std;
int main(){
    
    cin.tie(0);
    ios::sync_with_stdio(false);
    
    int n;
    cin >> n;
    
    rep(i,n){
        
        int a, b, c;
        cin >> a >> b >> c;
        
        if(a>b&&a>c){
            cout << ( (a == b) == c ? "NO" : b*b + c*c == a*a ? "YES" : "NO" ) << endl;
        }else if(b>a&&b>c){
            cout << ( (a == b) == c ? "NO" : a*a + c*c == b*b ? "YES" : "NO" ) << endl;
        }else{
            cout << ( (a == b) == c ? "NO" : a*a + b*b == c*c ? "YES" : "NO" ) << endl;
        }
    }
    return 0;
}

C++: #include <iostream>
#include <cstdio>
#define NMAX (1000)
using namespace std;
int main(void){
    
    int N = 0;
    int a=0;
    int b=0;
    int c=0;

    //N??°?????\???
    scanf("%d",&N);
    
    //N?????°???????????????a,b,c???????????????
    for(int Ncount = 0; Ncount < N; Ncount++){
        scanf("%d %d %d",&a,&b,&c);
        
        if( (a^2) + (b^2)  == (c^2) ){ printf("YES\n"); }
        else if( (b^2) + (c^2)  == (a^2)){ printf("YES\n"); } 
        else if( (c^2) + (b^2)  == (a^2)){ printf("YES\n"); }
        else{ printf("NO\n"); }
    }
}

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

// Is it a Right Triangle?(0003)
int main()
{
	int n;
	cin >> n;
	for (int i = 0; i < n; ++i) {
		vector<int> dat(3);
		for (int j = 0; j < 3; ++j)
			cin >> dat[j];

		sort(dat.begin(), dat.end(), greater<int>());

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

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

bool isRightTriangle(int a, int b, int c) {
    return(a*a + b*b == c*c);
}

int main(void) {
    int num; cin >> num;
    vector<int> vec(num);
    for(int r = 0; r < num; r++) {
        cin >> vec[0] >> vec[1] >> vec[2];
        sort(vec.begin(), vec.end());
        cout << (isRightTriangle(vec[0], vec[1], vec[2]) ? "YES" : "NO") << endl;
    }
    return(0);
}

C++: #include <bits/stdc++.h>
using namespace std;

int main(){
	int n; cin >> n;
	for(int i=0; i<n; i++){
		int a,b,c; cin >> a >> b >> c;
		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,b,c,N;
	cin >> N;
	for(int i = 0;i < N;i++){
		cin >> a >> b >> c;
		a *= a;
		b *= b;
		c *= c;
		if(a == b + c || b == a + c || c == a + b)
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}
	return 0;
}

C++: #include <iostream>
int main(void){
	int n,a,b,c,d;
	std::cin>>n;
	while(n--){
		std::cin>>a>>b>>c;
		d=a>b?a:b;
		d=c>d?c:d;
		std::cout<<(a*a+b*b+c*c==2*d*d?"YES\n":"NO\n");
	}
}

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

int main(void){
	int x[3];
	int d,i = 0;
	cin >> d;
	string n = "NO", y = "YES";
	while(i < d){
		sort(x,x + 3);
		if(x[2] <= x[1] + x[0])
			cout << y << endl;
		else
			cout << n << endl;
		d++;
	}
	return 0;
}

C++: #include <iostream>
 
using namespace std;
 
int main(){
  int num,tmp;
 
  cin >> num >> endl;

  int a[num][3];


  for(int i=0; i<num; ++i)
    cin >> a[i][0] >> a[i][1] >> a[i][2] >> endl;


  for(int i=0; i<num; ++i){
    
    for(int j=0; j<3; ++j){
      for(int k=j+1; k<3; ++k){
	if(a[i][j] < a[i][k]){
	  tmp = a[i][j];
	  a[i][j] = a[i][k];
	  a[i][k] = tmp;
	}
      }
    }
    
    if(a[i][0]*a[i][0] == a[i][1]*a[i][1] + a[i][2]*a[i][2]){
      cout << "YES\n";
    }else{
      cout << "NO\n";
    }
  }  

}

C++: #include <stdio.h>

int main(){
    int n, a, b, c, i;
    scanf("%d\n", &n);
    for(i = 0; i < n; i++){
        scanf("%d %d %d\n", &a, &b, &c);
        if((a*a + b*b) == c*c){
            printf("YES\n");
        }
        else if((b*b + c*c) == a*a){
            printf("YES\n");
        }
        else if((c*c + a*a) == b*b){
            printf("YES\n");
        }
        else{
            printf("NO\n");
        }
    }
    return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
    int n;
    int a,b,c;

    cin >> n;

    for(int i=0; i<3; ++i){
        cin >> a >> b >> c;
        if(a < b){
            swap(a,b);
        }
        if(a < c){
            swap(a,c);
        }

        if((a*a) == (b*b + c*c)){
            cout << "YES" << endl;
        }
        else{
            cout << "NO" << endl;
        }
    }

    return 0;
}