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 <vector>
#include <map>
#include <set>
#include <algorithm>
#include <numeric>
#include <cmath>
using namespace std;
typedef vector<int> VI;
#define REP( i, m, n ) for ( int i = (int)( m ); i < (int)( n ); ++i )

int main() {
    std::ios::sync_with_stdio(false);
    std::cin.tie(0);

    vector<vector<int>> triangles;
    
    int n;
    cin >> n;
    
    REP(i, 0, n) {
        vector<int> tmp;
        int a, b, c;
        cin >> a >> b >> c;
        tmp.push_back(a);
        tmp.push_back(b);
        tmp.push_back(c);
        
        sort(tmp.begin(), tmp.end());
        triangles.push_back(tmp);
    }

    for(auto sides : triangles) {
        if (sides[2] * sides[2] == sides[0]*sides[0]+sides[1]*sides[1]) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }
    
    return 0;
}

C++: #include<cstdio>
#include<algorithm>
#include<cmath>

using namespace std;

int main(){
        int a, b, c, i;
        bool ans = false;
        while(scanf("%d%d%d", &a, &b, &c) != EOF){ 
                ans = false;
                if(a * a + b * b == c * c)
                        ans = true;
                if(b * b + c * c == a * a)
                        ans = true;
                if(c * c + a * a == b * b)
                        ans = true;
                printf("%s\n", ans ? "YES" : "NO");
        }
        return 0;
}

C++: #include <iostream>
#include <sstream>
#include <string>
#include <algorithm>
#include <cstdlib>
#include <vector>
#include <iomanip>
#include <queue>
using namespace std;


int GetDigit(int n){
	int i = 0;

	while(n > 0){
		n /= 10;
		i++;
	}

	return i;
}
 
int main(){
	vector<int> a(3);
	int n, tmp;

	cin >> n;

	for(int i = 0; i < n; i++){
		for(int j = 0; j < 3; j++){
			cin >> a[j];
		}
		sort(a.begin(), a.end());

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

	return 0;
}

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

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

using namespace std;


int main(){
	int n;
	cin>>n;
	int hen1,hen2,hen3,saidai,max_pos=1;

	for(int i=0;i<n;i++){
		cin>>hen1>>hen2>>hen3;

		saidai=hen1;
		if(saidai<hen2){
			saidai=hen2;
			max_pos=2;
		}
		if(saidai<hen3){
			saidai=hen3;
			max_pos=3;
		}
		switch(max_pos){
		case 1:
			hen1=0;
			break;
		case 2:
			hen2=0;
			break;
		case 3:
			hen3=0;
			break;
		}
		if(saidai*saidai==(hen1*hen1+hen2*hen2+hen3*hen3))
			cout<<"YES"<<"\n";
		else{
			cout<<"NO"<<"\n";
		}
	}
	
	
	return 0;
}

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

int main(){ 
    int a,b,c,s;
    string res;

    cin >> s;
    while(s>0){
        cin >> a >> b >> c; 
        a = a*a;
        b = b*b;
        c = c*c;
        res = "YES";
        if(a!=(b+c) && b!=(a+c) && c!=(a+b)) res="NO";
        cout << res << endl;
        s--;    
    }
    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() {
	int n;
	int a, b, c;

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

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

C++: #include <stdio.h>
 
int i, N, a, b, c, A, B, C;

int print(void)
{
    if (C == A + B) {
        printf("YES\n");
    } else if (A == B + C) {
        printf("YES\n");
    } else if (B == C + A) {
        printf("YES\n");
    } else {
        printf("NO\n");
    }
}

int main(void)
{
    scanf("%d", &N);
    for (i = 0; i < N; i++) {
    scanf("%d %d %d\n", &a, &b, &c);
    A = a * a;
    B = b * b;
    C = c * c;
    print();
    }
    return 0;
}

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

using namespace std;

int main(void) {
	int n, a[3];
	
	cin >> n;

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

	return 0;
}

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

using namespace std;

int main(void){
	int n,val[3];

	cin >> n;
	for(int i=0;i<n;i++){
		for(int j=0;j<3;j++)
			cin >> val[j];

		for(int j=0;j<2;j++)
	        	for(int k=0;k<1-j;k++)
        			if(val[k]>val[k+1]){
                			int tmp = val[k];
                			val[k]=val[k+1];
                			val[k+1]=tmp;
				}

		string str = (pow(val[2],2.0)==pow(val[0],2.0)+pow(val[1],2.0))?"YES":"NO";
		cout << str << endl;
	}

	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;

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

  while(n!=0){
    vector<int> e(3); cin>>e[0]>>e[1]>>e[2]; 

    sort(e.begin(),e.end());

    if(e[2]*e[2]==e[1]*e[1]+e[0]*e[0])
      cout<<"YES"<<endl;
    else
      cout<<"NO"<<endl;

    --n;
  }

  return EXIT_SUCCESS;
}

C++: #include <iostream>
int main() {
  int N,a,b,c;
  std::cin >> N;
  for (int i = 0; i < N; i++) {
    std::cin >> a >> b >> c;
    if (a+b>c && b+c>a && c+a>b) {
      std::cout << "YES";
    } else {
      std::cout << "NO";
    }
    std::cout << std::endl;
  }
}

C++: #include <bits/stdc++.h>
#define FOR(i, a, b) for(int i = a; i < b; i++)
#define REP(i, n) FOR(i, 0, n)
using namespace std;

int main(){
    int n;
    cin >> n;
    REP(i, n) {
        int a, b, c; cin >> a >> b >> c;
        (a*a+b*b-c*c) / 2*a*b == 0 ? cout << "YES" << endl : cout << "NO" << endl;
    }
}