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>
#include<stdio.h>
#include<string>
using namespace std;
int main() {
	long judge[1000],i,n,a[1000],b[1000],c[1000];

	cin >> n;
	for (i = 0; i < n; i++) {
		cin >> a[i] >> b[i] >> c[i];
		if (a[i]*a[i] + b[i]*b[i] == c[i]*c[i] || a[i]*a[i]+c[i]+c[i]==b[i]*b[i]||b[i]*b[i]+c[i]*c[i]==a[i]*a[i]) {
			judge[i] = true;
			cout << "YES" << endl;
		}
		else {
			judge[i] = false;
			cout << "NO" << endl;
		}

	}
	
	
	

	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;

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

 return 0;
}

C++: #include<iostream>
#include<math.h>
#include<string>
using namespace std;
string heihou(double a, double b, double c)
{
	if (pow(a, 2.0) == pow(b, 2.0) + pow(c, 2.0) || pow(b, 2.0) == pow(a, 2.0) + pow(c, 2.0) || pow(c, 2.0) == pow(b, 2.0) + pow(a, 2.0)){
		return "YES";
	}
	else{
		return "NO";
	}
}
int main()
{
	double dataset[999][2];
	int i = 0;
	int l;
	cin >> l;
	while (i<l){
		cin >> dataset[i][0] >> dataset[i][1] >> dataset[i][2];
		i++;
	}
	for (int j = 0; j < i; j++){
		cout << heihou(dataset[j][0], dataset[j][1], dataset[j][2]) << endl;
	}
	return 0;
}

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

int main()
{
        unsigned int count=0;
        std::cin>>count;
        std::string* res;
        res=new std::string [count+1];
        for(unsigned int i=0;i<=count;i++)
        {
                std::string str;
                getline(std::cin,str);
                unsigned int a,b,c;
                std::stringstream s(str);
                s>>a>>b>>c;
                if((a*a==b*b+c*c)||(b*b==a*a+c*c)||(c*c==a*a+b*b))
                        res[i]="YES";
                else
                        res[i]="NO";
        }
        for(unsigned int i=1;i<=count;i++)
                std::cout<<res[i]<<std::endl;
        return 0;
}

C++: #include <iostream>

auto main () -> int
{
    const char * res [] = {"NO" , "YES"};
    int n;
    std::cin >> n;

    for (auto i = 0; i < n; ++ i)
    {
        int a , b , c;
        std::cin >> a >> b >> c;
        if (a > c)
        {
            std::swap (a , c);
        }
        if (b > c)
        {
            std::swap (b , c);
        }
        std::cout << res [a * a + b * b == c * c] << std::endl;
    }
}

C++: #include <iostream>
#include <fstream>
#include <string>
#include <map>
#include <stack>
#include <set>
#include <list>
#include <vector>
#include <algorithm>
#include <cassert>
#include <iterator>
#include <sstream>
#include <complex>
#include <bitset>
#include <iomanip>
#include <cctype>
#include <limits>
#include <numeric>
#include <cmath>
#include <functional>
#include <queue>
#include <cstring>

using namespace std;

typedef unsigned int uint;
typedef unsigned long long ull;

#define FORE(k,a,b) for(int k=(a); k <= (int)(b); ++k)
#define FOR(k,a,b) for(int k=(a); k < (int) (b); ++k)

#define pb push_back
#define mp make_pair
#define sfi(a) scanf("%d",&a)
typedef vector<int> vi;
typedef vector<bool> vb;
typedef vector<vb> vvb;
typedef vector<double> vd;
typedef vector<vi> vvi;
typedef vector<uint> uvi;
typedef vector<uvi> uvvi;
typedef vector<vd> vvd;
typedef pair<int,int> ii;
typedef vector<pair<int,int> > vii;
typedef vector<vii> vvii;
typedef pair<uint,uint> uu;
typedef map<string, int> msi;
#define sz(a) int((a).size())
#define pb push_back
#define all(c) (c).begin(),(c).end()
#define FOR_IT(c,i) for(typeof((c).begin() i = (c).begin(); i != (c).end(); i++)
#define contains(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())

int main(){

    int str[5],test;

    sfi(test);
    while(test--){

            scanf("%d%d%d",&str[0],&str[1],&str[2]);


        sort(str,str+3);

        if(str[2]*str[2]==(str[0]*str[0])+(str[1]*str[1]))
            puts("YES");
        else
            puts("NO");
    }




return 0;
}

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

using namespace std;

int main(){
	int n;
	int 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[1] * a[1] ) * (a[0] * a[0]))
		cout << "YES" << endl;
	else
		cout << "NO" << endl;
	}
	return 0;
}

C++: #include<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<string>
#include<algorithm>
#include<vector> 
#include<limits>
#include<numeric>
#include<math.h>
using namespace std;

#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define in(x) cin >> x
#define out(str) cout << str << endl

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

int N;

int main(){
    cin>>N;
    int a[N][3];
    rep(i,N){
        rep(j,3){
            cin>>a[i][j];
        }
    }
    rep(i,N){
        sort(a[i],a[i]+3);
        if(pow(a[i][0],2)+pow(a[i][1],2)==pow(a[i][2],2)){
            out("Yes");
        }
        else{
            out("No");
        }
    }
}

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

int main(){
	vector<vector<int> > a;

	int lines = 0;
	scanf("%d", &lines);

	bool isOk[lines];
	for (int i = 0; i < lines; ++i)
	{
		int l[3];
		for (int j = 0; j < 3; ++j)
			scanf("%d", &l[j]);

		double hen[3] = {pow(l[0], 2), pow(l[1], 2) ,pow(l[2], 2)};
		if(hen[0]+hen[1] == hen[2]) isOk[i] = true;
		else if(hen[1]+hen[2] == hen[0]) isOk[i] = true;
		else if(hen[2]+hen[0] == hen[1]) isOk[i] = true;
	}

	for (int i = 0; i < lines; ++i)
	{
		if(isOk[i]) printf("YES\n");
		else printf("NO\n");
	}
}

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

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

	}
	 return 0;
	}

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

int is_right_triangle(int min, int mid, int max) {
  return max * max == min * min + mid * mid;
}

int main() {
  int ntriangle;
  std::cin >> ntriangle;

  for (auto i = 0; i < ntriangle; i++) {
    std::vector<int> tri;
    for (auto j = 0; j < 3; j++) {
      int len;
      std::cin >> len;
      tri.push_back(len);
    }
    std::sort(tri.begin(), tri.end());
    if (is_right_triangle(tri[0], tri[1], tri[2])) {
      std::cout << "YES\n";
    } else {
      std::cout << "NO\n";
    }
  }
  return 0;
}