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"
	}
	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<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<string>
#include<algorithm>
#include<vector> 
#include<limits>
#include<numeric>
#include<math.h>
using namespace std;

#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define in(x) cin >> x
#define out(str) cout << str << endl

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

int N,a,b,c,A,B,C;

int main(){
    cin>>N;
    rep(i,N){
        cin>>a>>b>>c;
        A=a*a;
        B=b*b;
        C=c*c;
        if(A+B==C||B+C==A||C+A==B){
            out("Yes");
        }
        else{
            out("No");
        }
    }
}

C++: #include<iostream>

using namespace std;

int main(){
	
	int n;
	int x, y, z;
	
	cin >> n;
	for (int i = 0; i < n; i++){
		cin >> x >> y >> z;
		if(x > y && x > z){
			if((x * x) == ((y * y) + (z * z))){
				cout << "YES" << endl;
			}else{
				cout << "NO" << endl;
			}
		}else if(y > x && y > z){
			if((y * y) == ((x * x) + (z * z))){
				cout << "YES" << endl;
			}else{
				cout << "NO" << endl;
			}
		}else {
			if((z * z) == ((x * x) + (y * y))){
				cout << "YES" << endl;
			}else{
				cout << "NO" << endl;
			}
		}
		
	}
	
	return 0;
}

C++:   nano 2.6.1                                                      File: 29.cpp                                                                 

#include <iostream>
#include <sstream>

int main()
{
        unsigned int count=0;
        std::cin>>count;
        std::string* res;
        res=new std::string [count+1];
        for(unsigned int i=0;i<=count;i++)
        {
                std::string str;
                getline(std::cin,str);
                unsigned int a,b,c;
                std::stringstream s(str);
                s>>a>>b>>c;
                if((a*a==b*b+c*c)||(b*b==a*a+c*c)||(c*c==a*a+b*b))
                        res[i]="YES";
                else
                        res[i]="NO";
        }
        for(unsigned int i=1;i<=count;i++)
                std::cout<<res[i]<<std::endl;
        return 0;
}

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

int main(){
    int a;
    int b;
    int c;
    cin >> a;
    cin >> b;
    cin >> c;
    if (a * a + b * b == c * c || a * a + c * c == b * b || c * c + b * b == a * a) cout << "YES";
    else cout << "NO";
}

C++: #include <bits/stdc++.h>
using namespace std;
using uint = unsigned int;
using lint = long long int;
using ulint = unsigned long long int;
template<class T = int> using V = vector<T>;
template<class T = int> using VV = V< V<T> >;
template<class T, class U> void assign(V<T>& v, int n, const U& a) { v.assign(n, a); }
template<class T, class... Args> void assign(V<T>& v, int n, const Args&... args) { v.resize(n); for (auto&& e : v) assign(e, args...); }


int main() {
  cin.tie(nullptr); ios_base::sync_with_stdio(false);
  int n; cin >> n;
  for (int _ = 0; _ < n; ++_) {
    V<> a(3); for (int i = 0; i < 3; ++i) cin >> a[i];
    sort(begin(a), end(a));
    cout << (a[0] * a[0] + a[1] * a[1] == a[2] * a[2] ? "YES" : "NO") << '\n';
  }
}

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

int main()
{
	int N;
	cin >> N;
	int* a = new int[N];
	int* b = new int[N];
	int* c = new int[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])
			cout << "YES" << endl;
		else if(b[i]*b[i] == a[i]*a[i] + c[i]*c[i])
			cout << "YES" << endl;
		else if(c[i]*c[i] == a[i]*a[i] + b[i]*b[i])
			cout << "YES" << endl;
		else
			cout << "NO" << 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,short;

    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)
                short+=pow(d[i].a[j],2);
        if(short==pow(longest,2))
            printf("YES");
        else
            printf("NO");
    }
    return 0;
}

C++: #include <iostream>

#define reep(i,n,m) for(int i=(n);i<(m);i++)
#define rep(i,n) reep(i,0,n)

#define pow(x) (x)*(x)

using namespace std;

void solve(){
    int a[3];
    rep(i,3){
        cin >> a[i];
    }

    rep(i,3){
        if(pow(a[i])==pow(a[(i+1)%3])+pow(a[(i+2)%3])){
            cout << "YES" << endl;
            return;
        }
    }

    cout << "NO" << endl;
}

int main(){
    int n;
    cin >> n;
    while(n--){
        solve();
    }

}

C++: #include <iostream>
#include<math.h>
#include<iomanip>
#include<vector>
#include<algorithm>
#include<functional>
#include<string>
using namespace std;
int aa[1000][1000]={};
int main()
{
    int  i=0,j=0,n=0,a=0,b=0,c=0,d=0;


    cin >> n;
    for(i=0;i<n;i++){
        d=0;
        cin >> a >> b >> c;
        if(a>b&&a>c){
            if((a*a-(b*b+c*c)==0)){
                cout << "YES" << endl;
            }
            else cout << "NO" << endl;

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

}

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>
#define NMAX (1000)
using namespace std;
int main(void){
    
    int N = 0;
    int a=0;
    int b=0;
    int c=0;
    char* Result[NMAX];

    //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)) ){
            Result[Ncount] = "Yes";
        }else{
            Result[Ncount] = "NO";
        }
    }
    
    //??????????????????????????¨???Yes or No?????????
    for(int Ncount=0;Ncount < N;Ncount++){
        printf("%s\n",Result[Ncount]);
    }
    
}

C++: main(a,b,c){
	for(scanf("%*d");~scanf("%d%d%d",&a,&b,&c);puts(((a+b-c)&&(b+c-a)&&(a+c-b))?"NO":"YES"))a*=a,b*=b,c*=c;
	exit(0);
}