Go: package main
import (
        "fmt"
)

func main() {
        var num int
        fmt.Scan(&num)

        for i := 0; i < num; i++ {
                s1 := 0
                s2 := 0
                s3 := 0
                var chk int = 0
                fmt.Scanf("%d %d %d", &s1, &s2, &s3)
                if s1 >= s2 {
                        if s1 > s3 {
                                chk = 1
                        } else {
                                chk = 3
                        }
                } else {
                        if s2 >= s3 {
                                chk = 2
                        } else {
                                chk = 3
                        }
                }

                if (chk == 1 && s1*s1 == s2*s2 + s3*s3) ||
                        (chk == 2 && s2*s2 == s3*s3 + s1*s1) ||
                        (chk == 3 && s3*s3 == s1*s1 + s2*s2) {
                        fmt.Printf("YES\n")
                } else {
                        fmt.Printf("NO\n")
                }
        }
}

C++: #include <stdio.h>
int main(){
	int n, a, b, c, temp;
	scanf("%d", &n);
	for(int i = 0; i < n; i++){
		scanf("%d %d %d", &a, &b, &c);
		if(a > b){
			if(c > a){
				temp = c;
				c = a;
				a = temp;
			}
		}else{
			if(c > b){
				temp = c;
				c = a;
				a = temp;
			}else{
				temp = b;
				b = a;
				a = temp;
			}
		}
		if(b*b + c*c == a*a){
			printf("YES\n");
		}else{
			printf("NO\n");
		}
	}
	return 0;
}

C++: #include "iostream"
using namespace std;

int main()
{
	int n;
	cin>>n;
	int a[3];
	int b[3];
	int c[3];
	for(int i=0;i<n;i++)
	{
		cin>>a[i]>>b[i]>>c[i];
	}
	for(int j=0;j<3;j++)
	{
	    if(a[j]*a[j]+b[j]*b[j]==c[j]*c[j]||a[j]*a[j]+c[j]*c[j]==b[j]*b[j]||b[j]*b[j]+c[j]*c[j]==a[j]*a[j])
	   {
		   cout<<"YES"<<endl;
	   }
        else
		   cout<<"NO"<<endl;
	}
	return 0;
}

C++: using System;
using System.Linq;
public class Program {
	public static void Main() {
		int n = int.Parse(Console.ReadLine());
		for(int i = 0; i < n; i++) {
			string[] s = Console.ReadLine().Split();
			int[] a = new int[3];
			for(int j = 0; j < 3; j++) a[j] = int.Parse(s[j]);
			Array.Sort(a);
			Console.WriteLine(((a[0] * a[0] + a[1] * a[1] == a[2] * a[2]) ? "YES" : "NO"));
		}
	}
}

C++: #include<stdio.h>
int main(){
  int a[3];
  int temp;
  int i,j;
  for(i=0;i<3;i++){
    scanf("%d",&a[i]);
  }
  for(i=0;i<2;i++){
    for(j=0;j<2-i;j++){
      if(a[j]<a[j+1]){
	temp=a[j];
	a[j]=a[j+1];
	a[j+1]=temp;
      }
    }
  }
  if(a[0]*a[0]==a[1]*a[1]+a[2]*a[2]){
    printf("YES\n");
  }else{
    printf("NO\n");
  }
  return 0;
}

C++: #include <iostream>
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>b && a>c){
      if(b*b + c*c == a*a) cout << "YES" << endl;
      else cout << "NO" << endl;
    }
    else if(b>a && b>c){
      if(a*a + c*c == b*b) cout << "YES" << endl;
      else cout << "NO" << endl;
    }
    else {
      if(a*a + b*b == a*a) cout << "YES" << endl;
      else cout << "NO" << endl;
    }
  }

  return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
	int n,edge[3];
	cin >>n;
	for(int i=0; i<n; i++){
		cin >>edge[0] >>edge[1] >>edge[2];
		for(int l=0; l<3; l++){
			for(int m=0 ;m<2 ;m++){
				if(edge[m]<edge[m+1]){
					int c = edge[m];
					edge[m] = edge[m+1];
					edge[m+1] = c;
				}
			}
		}
		for(int l=0; l<3; l++){edge[l]=edge[l]*edge[l];}
		if(edge[0] == edge[1]+edge[2]){cout <<"YES"<<endl;}
		else{cout<<"NO"<<endl;}
	}
	return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
  int edge[3],n;
  cin >>n;
  while(n--){
    cin >>edge[0]>>edge[1]>>edge[2];
    sort(edge,edge+3);
    if(edge[2]*edge[2] == edge[1]*edge[1]+edge[0]*edge[0]){cout <<"YES"<<endl;}
    else{cout <<"NO"<<endl;}
  }
  return 0;
}

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

bool check_right_triangle(int a, int b, int c)
{
    if(a * a == b * b + c * c || b * b == c * c + a * a || c * c == a * a + b * b)
        return true;
    else return false;
}

int main()
{
    const int max_num_of_data = 1000;
    const int min = 1;
    const int max = 1000;
    
    int num_of_data;
    //std::cout << "データ数の入力" << std::endl;
    std::cin >> num_of_data;
    if(num_of_data > max_num_of_data){
        std::cout << "データ数<=" << max_num_of_data << std::endl;
        return 1;
    }
    
    int a, b, c;
    //std::cout << num_of_data << "個の整数データa b cの入力" << std::endl;
    for(int i = 0; i < num_of_data; ++i){
        std::cin >> a >> b >> c;
        if(min <= a && a <= max && min <= b && b <= max && min <= c && c <= max){
            if(check_right_triangle(a, b, c)
                std::cout << "Yes" << std::endl;
            else
                std::cout << "No" << std::endl;
        }else{
            --i;
            std::cout << "整数は" << min <<"以上" << max << "以下に設定" << std::endl;
        }
    }

    return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
    int a,x,y,z;
    cin >> a;
    int m[3][a];
    for (int i=0;i<a;i++){
        cin >> x >> y >> z ;
        m[0][i] = x;
        m[1][i] = y;
        m[2][i] = z;
    }
    for (int j=0;j<a;j++){
        if (m[0][j]^2+m[1][j]^2!=m[2][j]^2 && m[0][j]^2+m[2][j]^2!=m[1][j]^2 && m[1][j]^2+m[2][j]^2!=m[0][j]^2)
            cout << "NO" << endl;
        else
            cout << "YES" << endl;
    }
}

C++: #include <stdio.h>

int main(){

	int N = 0, a=0, b=0, c=0,i;

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

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

using namespace std;

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

C++: #include<stdio.h>


int main(){
	int N = 0 ,i,j,k,cheak = 0,tmp = 0;
	int tri[2];
	scanf("%d",&N);
	for(i=0;i<=N;i++){
		scanf("%d %d %d",&tri[0],&tri[1],&tri[2]);
		for(j = 0;j <= 2;j++){
			for(k = j + 1;k <= 2;k++){
				tmp = tri[j];
				tri[j] = tri[k];
				tri[k] = tmp;
			}
		}
		if(tri[0] * tri[0] == tri[1] * tri[1] + tri[2] * tri[2]){printf("YES\n");}
		else{printf("NO\n");}
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
int i,j,d,k,n1,n2,n3,temp;
 int l[3];

int rt()
{
//入力
cin >> n1 >> n2 >> n3;
while(n1 < 1 or n1 > 1000 or n2 < 1 or n2 >1000 or n3 < 1 or n3 > 1000){
cin >> n1 >> n2 >> n3;
}
if(n1 >= 1 and n1 <= 1000 and n2 >= 1 and n2 <=1000 and n3 >= 1 and n3 <= 1000){
       l[0]=n1;
       l[1]=n2;
       l[2]=n3;
        for (i = 0; i < 2; i++) {
        for (j = 2; j > i; j--) {
            if (l[j - 1] > l[j]) {  
                temp = l[j];  
                l[j] = l[j - 1];
                l[j - 1] = temp;
            }
        }
    }
 }
    if(l[2]*l[2] == (l[1]*l[1]+l[0]*l[0])){
    cout << "YES\n";
    }else{
    cout << "NO\n";
    }
}



int main(){

   cin >> d;
   while(d < 1 or d > 1000){
       cin >> d;
   }

for(k=0;k<d;k++){
    rt();
}

    return 0;
}

C++: #include <iostream>
using namespace std;
int main(void){
    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" << endl;
        else if(b*b+c*c==a*a)    cout << "YES" << endl;
        else if(c*c+a*a==b*b)    cout << "YES" << endl;
        else                    cout << "NO" << endl;
    }
}