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 <iostream>
#include <cstdio>
using namespace std;

int main()
{
    int a,b,c,n;
    scanf("%d",&n);
    while(n--)
    {
        scanf("%d%d%d",&a,&b,&c);
        if(c*c==a*a+b*b)
            printf("Yes\n");
        else printf("No\n");
    }
    return 0;
}

C++: #include<stdio.h>
int main(void){
	int i,N;
	scanf("%d",&N);
	for(i=0;i<N;i++){
		int j,a[3]={},b[3]={};
		for(j=0;j<3;j++){
			scanf("%d",&a[j]);
			}
		
		b[0]=a[0];
		if(a[0]<a[1]){
			b[1]=a[0];
			b[0]=a[1];
		}b[1]=a[1];
		if(b[0]<a[2]){
			b[2]=b[1];
			b[1]=b[0];
			b[0]=a[2];
		}else if(b[1]<a[2]&&a[2]<b[0]){
			b[2]=b[1];
			b[1]=a[2];
		}else b[2]=a[2];
		
	
		if(b[0]*b[0]==b[1]*b[1]+b[2]*b[2])
			puts("YES");
		else puts("NO");
	}
	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;
	cout << ((a*a+b*b==c*c || b*b+c*c==a*a || a*a+c*c==b*b)? "YES": "NO") << endl;
  }
}

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

int main(){
	int N;
	cin>>N;
	int ** kazu=new int*[N];
	for(int i=0;i<N;i++)
		kazu[i]=new int[3];
	int *saidai=new int[N];
	bool *hantei=new bool[N];
	fill(hantei,hantei+N,false);

	for(int j=0;j<N;j++){
		cin>>kazu[j][0]>>kazu[j][1]>>kazu[j][2];
		if(kazu[j][0]<kazu[j][1]){
			swap(kazu[j][0],kazu[j][1]);
			if(kazu[j][0]<kazu[j][2])
				swap(kazu[j][0],kazu[j][2]);
		}
		else if(kazu[j][0]<kazu[j][2]){
			swap(kazu[j][0],kazu[j][2]);
			if(kazu[j][0]<kazu[j][1])
				swap(kazu[j][0],kazu[j][1]);
		}
		
		if((kazu[j][0]*kazu[j][0])==(kazu[j][1]*kazu[j][1]+kazu[j][2]*kazu[j][2]))
			hantei[j]=true;
	}
	for(int k=0;k<N;k++)
		cout<<((hantei[k])?"YES":"NO")<<endl;

	return 0;
}

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

int main() {
	int n = 0, a = 0, b = 0, c = 0;
	cin >> n;
	for (int i = 0; i < n; i++) {
		std::cin >> a >> b >> c;
		if (c < a) swap(c, a); // a <= c && b <= c ?????????
		if (c < b) swap(c, b);
		if (a*a + b*b == c*c) {
			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==nIn[2])
		{
			swap(nIn[2],nIn[0]);
		}
		else if (nMax==nIn[1])
		{
			swap(nIn[1],nIn[2]);
		}
		if(nIn[0]*nIn[0]==nIn[1]*nIn[1]+nIn[2]*nIn[2])
		{
			cout<<"YES"<<endl;
		}
		else
		{
			cout<<"NO"<<endl;
		}
	}
	return 0;
}

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

int main()
{
	int n;cin>>n;
	for(int i=0;i<n;i++)
	{
		double a,b,c;
		cin>>a>>b>>c;
		if(pow(a,2)+pow(b,2)==pow(c,2))
		{
			cout<<"YES"<<endl;
			continue;
		}
		if(pow(a,2)+pow(c,2)==pow(b,2))
		{
			cout<<"YES"<<endl;
			continue;
		}
		if(pow(b,2)+pow(c,2)==pow(a,2))
		{
			cout<<"YES"<<endl;
			continue;
		}
		cout<<"NO"<<endl;
	}
}

C++: #include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#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;
		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;
		}
	}
	return false;
}

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>
#include <algorithm>

using namespace std;

int main()
{
    int num, h, l, r;
    int line[3];

    cin >> num;

    for (int n = 0; n < num; n++)
    {
        cin >> line[0] >> line[1] >> line[2];

//        cout << "input:" << line[0] << " " << line[1] << " " << line[2] << endl;

        h = 0;
        l = 0;
        r = 0;

        h = *max_element(line, line + num);
//        cout << "max:" << h << endl;

        for (int i = 0; i < 3; i++)
        {
            if (line[i] == h && l == 0)
            {
                l = line[i] * line[i];
            }
            else
            {
                r += line[i] * line[i];
            }
        }

//        cout << "left:" << l << endl;
//        cout << "right:" << r << endl;

        if (l == r)
        {
            cout << "YES" << endl;
        }
        else
        {
            cout << "NO" << endl;
        }
    }

    return 0;
}

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

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

C++: #include<stdio.h>

int main(void)
{
	int i;
	int x[1000]={0},y[1000]={0},z[1000]={0},hantei[1000]={0};
	int j=0,e =0;

	while(e==0)
	{
		scanf("%d %d %d",&x[j],&y[j],&z[j]);
		
		if(x[j]<=0 || 1000<x[j] || y[j]<=0 || 1000<y[j] || z[j]<=0 || 1000<z[j])break;

		j=j+1;
	}

	for(i=0;i<j;i++)
	{
		if(y[i]<x[i] && z[i]<x[i])
		{
			if(x[i]*x[i] == y[i]*y[i]+z[i]*z[i])
				hantei[i]=1;
		}
		else if(x[i]<y[i] && z[i]<y[i])
		{
			if(y[i]*y[i] == x[i]*x[i]+z[i]*z[i])
				hantei[i]=1;
		}
		else
		{
			if(z[i]*z[i] == x[i]*x[i]+y[i]*y[i])
				hantei[i]=1;
		}
	   
	switch(hantei[i])
	    {
		   case 0:
			  printf("NO\n");
			  break;
		   case 1:
			  printf("Yes\n");
		      break;
	   }
	}

	return 0;
}

C++: #include <iostream>

using namespace std;

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

    while(N--){
        int x,y,z;
        cin>>x>>y>>z;
        if((x^2+y^2)==(z^2)||(x^2+z^2)==(y^2)||(y^2+z^2)==(x^2))cout<<"YES\n";
        else cout<<"NO\n";
    }
}

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;
        if(a*a==c*c+b*b||b*b==c*c+a*a||c*c==a*a+b*b)cout<<"Yes"<<endl;
        else cout<<"No"<<endl;
    }
    return 0;
}