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<vector>
#include<string>
using namespace std;

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

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

int main(void){
	int n;
	cin>>n;

	while(n--){
		int a,b,c;
		cin>>a>>b>>c;
		a *= a;
		b *= b;
		c *= c;
		cout<<(a+b==c || a+c==b || b+c==a ? "YES" : "NO")<<endl;
	}

	return 0;
}

C++: #include<iostream>

int main(){
	int a,b,c;
	while(std::cin>>a>>b>>c){
	if(a*a+b*b==c*c){
		std::cout<<"YES"<<std::endl;
	}else if(a*a+c*c==b*b){
		std::cout<<"YES"<<std::endl;
	}else if(b*b+c*c==a*a){
		std::cout<<"YES"<<std::endl;
	}else{
		std::cout<<"NO"<<std::endl;
	}
}
	return 0;
}

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


string Judge_triangle(int a,int b,int c){
    if(a+b>c && b+c>a && c+a>b){
        return "YES";
    }
    else{
        return "NO";
    }
}

bool Judge_line(int x){
    if(1<=x || x<=1000 || ceil(x) == floor(x))
        return false;
    else
        return true;
}

int main(){
  int N;
  int a,b,c;
  int n=0;
    
    while(1){

  cin >> N;
    
        if(N > 1000 || ceil(N) != floor(N)){
            
        }
    else
        break;
    }
    
    string x[N];

while(N > 0 && cin >> a >> b >> c){
    
    
    while(1){
        if(Judge_line(a) && Judge_line(b) && Judge_line(c)){
            
            break;
        }
        
        else{
            x[N-1] = Judge_triangle(a,b,c);
            N--;
            n++;
            break;
        }
  }
}
    for(int i = 0;i < n;i++)
        cout << x[i] << endl;
    
  return 0;
}

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

int main(){
    int times;
    cin >> times;

    for (int i = 0;i < times; i++) {
        int a, b, c;
        cin >> a >> b >> c;

        double a2, b2, c2;
        a2 = pow(a,2);
        b2 = pow(b,2);
        c2 = pow(c,2);

        if (a2 == b2 + c2 || b2 == a2 + c2 || c2 == a2 + b2) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }

    return 0;
}

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

int main() {
	int a, b, c, num;

	cin >> num;

	int* bat = new int[ num * 3 ];

	for( int i = 0; i < num; ++i ) {
		cin >> bat[ i*3 + 0 ] >> bat[ i*3 + 1 ] >> bat[ i*3 + 2 ];
	}

	for( int i = 0; i < num; ++i ) {
		a = bat[ i*3 + 0 ];
		b = bat[ i*3 + 1 ];
		c = bat[ i*3 + 2 ];
		if ( a < b ) {
			int t = a;
			a = b;
			b = t;
		}
		if ( a < c ) {
			int t = a;
			a = c;
			c = t;
		}
		
		if ( !( a*a - ( b*b + c*c ) ) ) {
			cout << "YES" << endl;
		} else {
			cout << "NO" << endl;
		}
	}

	delete[] bat;
}

C++: #include<stdio.h>
int main(void)
{
	int a,b,c,n,i;

	scanf("%d",&n);
	
	for(i=0;i<n;i++){
	
		scanf("%d %d %d",&a,&b,&c);

		if(a*a==b*b+c*c || b*b==a*a+c*c || c*c==a*a+b*b){
		printf("YES\n");
		}
		else{
			printf("NO\n");
		}
	}

	return 0;
}

C++: #include <iostream>
#include <math.h>
#include <algorithm>
using namespace std;
int main(){
	int a,b[3]={0};
	cin>>a;
	for (int A=0;A<a;A++){
		cin>>b[0]>>b[1]>>b[2];
		sort(b,b+3);
		b[0]=pow(b[0],2);
		b[1]=pow(b[1],2);
		b[2]=pow(b[2],2);
		if (b[0]==24) b[0]+=1;
		if (b[1]==24) b[1]+=1;
		if (b[2]==24) b[2]+=1;
		if (b[2]!=b[0]+b[1]) cout<<"No"<<endl;
		else cout<<"Yes"<<endl;
	}
	return 0;
}

C++: #include<stdio.h>
#include<math.h>

#define N 1000

struct{int a[3];} d[N];

int main(){
    int i,j,L;
    int longest,small;

    for(i=0; i<N,scanf("%d %d %d",&d[i].a[0],&d[i].a[1],&d[i].a[2])!=EOF; i++);
    L=i;
    for(i=0;i<L;i++){        
        longest=0;
        for(j=0;j<3;j++)
            if(longest<d[i].a[j])
                longest=d[i].a[j];
        for(j=0;j<3;j++)
            if(d[i].a[j]!=longest)
                small+=pow(d[i].a[j],2);
        if(small==pow(longest,2))
            printf("YES");
        else
            printf("NO");
    }
    return 0;
}

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

using namespace std;

int main()
{
	int a; cin >> a;
	int t[3];

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

	return 0;
}

C++: #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define shosu(n) setprecision(n)
using namespace std;
int main() {
  int A[3], N;
  for (int Q = 0; Q < N; Q++) {
    rep(i, 3) cin >> A[i];
    sort(A, A + 3);
    if (A[0] * A[0] + A[1] * A[1] - A[2] * A[2] == 0)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
}

C++: #include <iostream>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <algorithm>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <sstream>
#include <complex>
#include <ctime>
#include <cassert>
#include <functional>

using namespace std;

typedef long long ll;
typedef vector<int> VI;
typedef pair<int, int> PII;

#define REP(i,s,t) for(int i=(s);i<(t);i++)
#define FILL(x,v) memset(x,v,sizeof(x))

using namespace std;
string is_valid_triangle(int a, int b, int c){
    string out = "NO";
    if (pow(a, 2) == pow(b,2) + pow(c,2) || pow(b, 2) == pow(a, 2) + pow(c, 2) || pow(c, 2) == pow(a, 2) + pow(b, 2)){
        out = "YES";
    }
    return out;
}
int main() {
    int l;
    cin >> l;
    REP(i, 0, l){
        int a, b, c;
        cin >> a >> b >> c;
        cout << is_valid_triangle(a, b, c) << endl;
    }
    return 0;
}

C++: #include<iostream>
#include<math.h>
#include<algorithm>
#include<string>
using namespace std;
int main(){
    int n,a[3],b[3],l,k;
    cin>>n;
    for(l=0;l<n;l++){
        if(n>1000||n<=0){
            break;
        }
        for(k=0;k<3;k++){
            cin>>a[k];
            if(a[k]>1000||a[k]<=0){
                break;
            }
            b[k]=a[k]^2;
        }
        sort(b,b+3);
        if(b[2]==b[0]+b[1]){
            cout<<"YES"<<endl;
        }
        else{
            cout<<"NO"<<endl;
        }
    }
    return 0;
}