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<algorithm>
using namespace std;
int main(){
  int n;
  cin >>n;
  while(n--){
    vector<int> edge(3);
    for(int i=0; i<3; i++) cin >>edge[i];
    sort(edge.begin(), edge.end());
    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 <cstdio>
#include <cmath>

using namespace std;

long dd(int n){
	return n*n;
}

int main(){
	int n, t[3];
	
	cin >> n;
	for(int i=0; i<n; ++i){
		for(int j=0; j<3; ++j)
		scanf(" %d", &t[j]);
	 		
		sort(t, t+3);
		if( dd(t[2]) == dd(t[0])+dd(t[1]) ) printf("YES\n");
		else printf("NO\n");
	}
	 
	return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <cctype>
#include<algorithm>
#define pf printf
#define sf scanf
#define wh while
#define db double
#define LL long long
#define _USE_MATH_DEFINES
#define re(i,a,b) for(int i=a;i<b;i++)
#define rev(i,a,b) for(int i=a;i>=b;i--)

using namespace std;

int main()
{
    int t,a,b,c;
    cin>>t;
    wh(t--){
        sf("%d%d%d",&a,&b,&c);
        if((a*a==b*b+c*c)||(b*b==a*a+c*c)||(c*c==a*a+b*b))pf("YES\n");
        else pf("NO\n");
    }
    return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int main(void){
    int n;
    vector<int> a(3);
    cin>>n;
    for(int i=0;i<n;i++){
        cin>>a[0]>>a[1]>>a[2];
        sort(a.begin(),a.end());
        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>
 
using namespace std;
int main(){
  int n;
cin >> n;
  while( n-- ){
    int a,b,c;
    cin >> a >> b >> c;
    if(a == b && b == c)cout << "YES";
    else cout << "NO";
    cout << endl;
  }
  return 0;

C++: def main():
    def inputs():
        li = []
        count = 0
        try:
            N = input()
            while count < int(N):
                li.append(input())
                count += 1
        except EOFError:
            return li
        return li

    li = inputs()
    for x in li:
        tmp = x.split(" ")
        tmp = sorted(tmp)
        a,b,c = int(tmp[0]),int(tmp[1]),int(tmp[2])
        if c**2 == a**2 + b**2:
            print("YES")
        else:
            print("NO")
    return None

main()

C++: #include <iostream>
#include <sstream>
#include <vector>
#include <algorithm>
#include <string>
#include <functional>
#include <numeric>
#include <ctype.h>
#include <cstdlib>
#include <string.h>
#include <cmath>
#include <cstdio>





using namespace std;


int main()
{

	int count ;
	int a, b, c, maxs;

	cin >> count;

	for (int i = 0; i < count; i++)
	{
		cin >> a >> b >> c;

		maxs = max({ a, b, c });

		if (maxs == a)
		{
			if (maxs == sqrt(b * b + c * c))
				cout << "YES" << endl;
			else
				cout << "NO" << endl;
		}
		else if (maxs == b)
		{
			if (maxs == sqrt(a * a + c * c))
				cout << "YES" << endl;
			else
				cout << "NO" << endl;
		}
		else if(maxs == c)
		{
			if (maxs == sqrt(a * a + b * b))
				cout << "YES" << endl;
			else
				cout << "NO" << endl;
		}
	}


}

C++: #include <cstdio>
#include <set>

int main() {
    int n;
    scanf("%d", &n);
    
    std::multiset<int> ms;
    int a, b, c;
    for (int i = 0; i < n; ++i) {
        scanf("%d %d %d", &a, &b, &c);
        ms.insert(a);
        ms.insert(b);
        ms.insert(c);

        auto it = ms.begin();
        a = *it++;
        b = *it++;
        c = *it;
        
        printf(a*a + b*b == c*c ? "YES\n" : "NO\n");
        ms.clear();
    }
}

C++: 
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <string>
#include <vector>
#include <set>
#include <map>
#define pi 3.14159265358979323846264338
using namespace std;

int main() {
	double a, b, c;
	while (cin >> a >> b >> c) {
		if (pow(max(a, max(b, c)), 2) == pow(min(a, min(b, c)), 2) + pow(max(a, min(b, c)), 2)) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" <<endl;
		}
	}
	return 0;
}

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

using namespace std;


int main(){
    int input[3];
    int N;
    string *str;
    
    cin >> N;
    
    str=new string[N];
    
    for(int i=0;i<N;i++){
        cin>>input[1]>>input[2]>>input[3];
        sort(input,input+3);
        if(input[1]==sqrt((pow((double)input[2],(double)2)+pow((double)input[3],(double)2)))) str[i]="YES";
        else str[i]="NO";
    }
    
    for(int i=0;i<N;i++) cout<<str[i]<<endl;
    
    delete[] str;
    
    return 0;

}

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

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

  int i, n, a, b, c;
  vector<int> triangle;
  cin >> n;

  for (i = 0; i < n; i++) {
    cin >> a;
    cin >> b;
    cin >> c;
    triangle.push_back(a);
    triangle.push_back(b);
    triangle.push_back(c);

    sort(triangle.begin(), triangle.end());
    if (triangle.at(0) * triangle.at(0) + triangle.at(1) * triangle.at(1) == triangle.at(2) * triangle.at(2)) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }

    triangle.clear();
  }

  return 0;
}

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

using namespace std;

int main()
{
	int num;

	cin >> num;
	if(num > 1000)
		return -1;

	for(int ix = 0;ix != num;++ix){
		int set[3];
		cin >> set[0] >> set[1] >> set[2];

		int big=0,other1,other2;
		for(int ix = 0;ix != 3;++ix)
			for(int jx = 0;jx  != 3;++jx)
				if(set[ix] <= set[jx])
					if(set[big] <= set[jx])
						big = jx;
		switch(big){
		case 0:other1 = 1;other2 = 2;
		case 1:other1 = 0;other2 = 2;
		case 2:other1 = 0;other2 = 1;
		}
		if((set[other1]*set[other1] + set[other2]*set[other2])==set[big]*set[big])
			cout <<"YES"<<endl;
		else
			cout <<"NO"<<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]>1000 || m[1][j]>1000 || m[2][j]>1000)
            cout << "NO" << endl;
        if(m[0][j]<1 || m[1][j]<1 || m[2][j]<1)
            cout << "NO" << endl;
        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 <iostream>
using namespace std;

int main(){
    int a,b,c,d;
    while(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;
}