Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func read() string {
	sc.Scan()
	return sc.Text()
}

func main() {
	// sc.Split(bufio.ScanLines)
	sc.Split(bufio.ScanWords)
	n, _ := strconv.Atoi(read())
	s := make([]int, 3)
	for i := 0; i < n; i++ {
		s[0], _ = strconv.Atoi(read())
		s[1], _ = strconv.Atoi(read())
		s[2], _ = strconv.Atoi(read())
		sort.Sort(sort.IntSlice(s))
		if (s[2] * s[2]) == ((s[0] * s[0]) + (s[1] * s[1])) {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

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

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

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

  int a[num][3];


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


  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 <bits/stdc++.h>
using namespace std;

int main(){
    int n;
    cin >> n;
    while (n!=0){
        int a , b , c;
        cin >> a >> b >> c;
        if(a*a==b*b+c*c || b*b==a*a+c*c || c*c==a*a+b*b) cout << "YES" << endl;
        else cout << "NO" << endl;
        --n;
    }
}

C++: #include <stdio.h>

using namespace std;

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

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

int main() {
	int i, a[3];
	cin >> i;
	for (int j = 0; i > j; j++) {
		cin >> a[0] >> a[1] >> a[2];

		sort(a,a+3);

		if(a[0]*a[0] + a[1] * a[1] == a[2] * a[2]) cout<<"Yes"<<endl;
		else                                       cout<<"No"<<endl;
	}
	return 0;
}

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

int main(){

	int n;
	int sd[3];
	int max,m=-1;
	bool isRect=false;
	bool isTri=true;

	cin>>n;

	for(int i=0;i<n;++i){
		cin>>sd[0]>>sd[1]>>sd[2];
		//長辺の判定
		max=0;
		for(int i=0;i<3;++i){
			if(sd[i]==0){isTri=false;}
			if(sd[i]>max){m=i;max=sd[i];}
		}

		//直角三角形の判定
		if(isTri){
			switch(m){
			case 0:
				if(sd[0]*sd[0] == (sd[1]*sd[1] + sd[2]*sd[2])){isRect=true;}else{isRect=false;}
				break;
			case 1:
				if(sd[1]*sd[1] == (sd[0]*sd[0] + sd[2]*sd[2])){isRect=true;}else{isRect=false;}
				break;
			case 2:
				if(sd[2]*sd[2] == (sd[1]*sd[1] + sd[0]*sd[0])){isRect=true;}else{isRect=false;}
				break;
			}
		}

		if(isRect){cout<<"YES\n";}else{cout<<"NO\n";}

	}
}

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

using namespace std;

int main(void){
  int data1[1000],data2[1000],data3[1000],data4[1000];
  int g,i;
  cin >> g;
  for(i=0;i<g;i++){
    cin >> data1[i] >> data2[i] >> data3[i];
  }
  int m,j;
  i=0;
  for(i=0;i<g;i++){
    for(j=0;j<3;j++){
      if(data1[i] < data2[i]){ m = data2[i]; data2[i] = data1[i]; data1[i] = m;  }
      if(data2[i] < data3[i]){ m = data3[i]; data3[i] = data2[i]; data2[i] = m;  }
    }
    if(pow(data1[i],2) == (pow(data2[i],2)+pow(data3[i],2))) cout << "YES" <<endl;
    else cout << "NO" << endl;
  }

}

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

int main(){
  int a,b,c;
  while(scanf("%d %d %d",&a,&b,&c)!=EOF){
  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>
#include <algorithm>
using namespace std;

int main()
{
	int nNum=0;
	cin>>nNum;
	int nIn[3]={0};
	while(nNum--)
	{
		cin>>nIn[0]>>nIn[1]>>nIn[2];
		int nMax=max(max(nIn[0],nIn[1]),nIn[2]);
		if(nMax*nMax*2==nIn[0]*nIn[0]+nIn[1]*nIn[2]+nIn[2]*nIn[2])
		{
			cout<<"YES"<<endl;
		}
		else
		{
			cout<<"NO"<<endl;
		}
	}
	return 0;
}

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

using namespace std;

int main() {
	int kaisu;
	int x,y,z;
	int kekka;
	
	cin >> kaisu;
	
	for(int i = 1; i <= kaisu; i++){
	cin >> x >> y >> z;
	int array[3];
	array[0] = x;
	array[1] = y;
	array[2] = z;
		if( array[0] < array[1] ){
		swap(array[0],array[1]);
		}
		if( array[0] < array[2] ){
		swap(array[0],array[2]);
		}
		if( array[1] < array[2] ){
		swap(array[1],array[2]);
		}
	kekka = ((array[1]*array[1]+array[2]*array[2])-array[0]*array[0])/2*array[1]*array[2];
	if (kekka == 0){
	cout << "YES"<<endl;
	}
	else {
	cout << "NO" << endl;
	}
	}

    return 0;
}

C++: i;main(a,b,c){for(scanf("%*d"),i=400;i--&&~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);}

C++: #include <iostream>

using namespace std;

int main() {

	int dataNum;

	cin >> dataNum;

	for (int i = 0; i < dataNum; i ++) {
		
		int hen[3];

		cin >> hen[0] >> hen[1] >> hen[2];

		//????????????????????§?????????
		for (int j = dataNum - 1; j > 0; j--) {
			for (int k = 0; k < j; k++) {
				if (hen[k] > hen[k + 1]) {
					int dummy = hen[k];
					hen[k] = hen[k + 1];
					hen[k + 1] = dummy;
				}
			}
		}

		//??´?§?????????§??????
		if (hen[0] * hen[0] + hen[1] * hen[1] == hen[2] * hen[2]) {
			cout << "Yes" << endl;
		}
		else {
			cout << "No" << endl;
		}
	}

	return 0;
}

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

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

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

int length[3], length_max, n;

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

	while(n){
		std::cin >> length[0] >> length[1] >> length[2];

		length_max = *( std::max_element( length, &length[2] ) );

		std::cout << ( length_max * length_max == length[0] * length[0] + length[1] * length[1] + length[2] * length[2] - length_max * length_max ? "YES" : "NO" ) << std::endl;

		n--;
	}
	
	return 0;
}

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

int main()
{
	int a[1000],b[1000],c[1000];
	int kosuu;
	char ans[1000];
	int i;

	cin>>kosuu;//個数入力

	for(i=0;i<kosuu;i++)
	{
		cin>>a[i]>>b[i]>>c[i];//数値入力

		if(a[i]>b[i]&&a[i]>c[i])//aがbとcよりも大きかったら
		{
			if(a[i]*a[i]==b[i]*b[i]+c[i]*c[i]){ans[i]=1;}
			else{ans[i]=0;}
		}
		else if(b[i]>a[i]&&b[i]>c[i])//bがaとcよりも大きかったら
		{
			if(b[i]*b[i]==a[i]*a[i]+c[i]*c[i]){ans[i]=1;}
			else{ans[i]=0;}
		}
		else if(c[i]>a[i]&&c[i]>b[i])//cがbとaよりも大きかったら
		{
			if(c[i]*c[i]==b[i]*b[i]+a[i]*a[i]){ans[i]=1;}
			else{ans[i]=0;}
		}
		else if(a[i]==b[i]||a[i]==c[i]||b[i]==c[i]){ans[i]=0;}
	}
	for(i=0;i<kosuu;i++)
	{
		if(ans[i]==1){cout<<"YES"<<endl;}
		else if(ans[i]==0){cout<<"NO"<<endl;}
	}

		
	return 0;
}

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

int main() {

    int N;
    cin >> N;
    //cout << N;
    int hen[3];
    while (N --> 0) {
        cin >> hen[0] >> hen[1] >> hen[2];
        sort(hen, hen + 3);
        
        if (hen[2] * hen[2] == hen[0] * hen[0] + hen[1] * hen[1]) {
            cout << "YES";
        } else {
            cout << "NO";
        }
    }
    

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

    return 0;
}