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 <bits/stdc++.h>
#include <chrono>
using namespace std;

using _i64 = int64_t;
using _u64 = uint64_t;
using _f64 = double;

#define _for(i, start, end) for(_i64 i = (_i64)start; i < (_i64)end; ++i)
#define _rep(i, number) _for(i, 0, number)
#define _foreach(e, data) for(auto& e : data)
#define _all(data) data.begin(), data.end()

template<typename type>
_i64 _size(const type& data) { return static_cast<_i64>(data.size()); }
template<typename type, size_t size>
_i64 _size(const type (&)[size]) { return static_cast<_i64>(size); }

enum _flag : bool { able = true, disable = false };

struct _time {
    _time(_flag flag) { check = flag; if(!check) { return; } gettime(start); }
    ~_time() {
        if(!check) { return; }; gettime(end);
        _i64 elapse = chrono::duration_cast<chrono::milliseconds>(end - start).count();
        cout << endl << "Time: " << elapse << " ms" << endl;
    }
    private:
    using _timer = chrono::time_point<chrono::system_clock>;
    _timer start, end; bool check;
    void gettime(_timer& time) { time = chrono::system_clock::now(); }
};

struct _ini { _ini() { ios::sync_with_stdio(false); cin.tie(nullptr); } } _ini;

int main() {
    {
        _time time(disable);
        _i64 N; vector<_i64> l(3); cin >> N; 
        _rep(i, N) {
            _foreach(e, l) { cin >> e; } sort(_all(l));
            cout << (pow(l[0], 2) + pow(l[1], 2) == pow(l[2], 2) ? "YES" : "NO") << endl;
        }
    }
    return 0;
}

C++: #include<iostream>

using namespace std;


int main(void){
	
	int n;
	int a,b,c;
	cin>>n;
	while(n>0){
		cin>>a>>b>>c;
		if(a+b>c&&a+c>b&&b+c>a){
			
			if(a*a+b*b==c*c||a*a+c*c==b*b||b*b+c*c==a*a)
				cout<<"YES"<<endl;
			else{
				cout<<"NO"<<endl;
			}
			
		}
		else{
			cout<<"NO"<<endl;
		}
		
			
		n--;
	}
	
	
	return 0;
}

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

bool isRightTriangleCore(int a, int b, int c)
{
  return a * a + b * b == c * c;
}

bool isRightTriangle(int a, int b, int c)
{
  int ret = false;

  ret |= isRightTriangleCore(a, b, c);
  ret |= isRightTriangleCore(c, a, b);
  ret |= isRightTriangleCore(b, c, a);

  return ret;
}

int main(void)
{
  int n;

  std::cin >> n;

  while (n--) {
    int a, b, c;

    std::cin >> a >> b >> c;

    if (isRightTriangle(a, b, c)) {
      std::cout << "YES" << std::endl;
    }
    else {
      std::cout << "NO" << std::endl;
    }
  }

  return 0;
}

C++: #include <iostream>
    
inline bool isRightTriangle(const u_int a, const u_int b, const u_int c){
    return (a*a == b*b + c*c || b*b == c*c + a*a || c*c == a*a + b*b);
}
    
int main(){
    u_int n;
    std::cin >> n;
       
    for (u_int i = 0; i < n; ++i){
        u_int a, b, c;
        std::cin >> a >> b >> c;
        std::cout << (isRightTriangle(a, b, c) ? "YES" : "NO") << std::endl;
    }
    
    return 0;
}

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

int main(){

	int a[3];

	while(std::cin >> a[0] >> a[1] >> a[2]){
		std::sort(a,a+3);
		if(a[2]*a[2]==a[0]*a[0]+a[1]*a[1]){
			std::cout << "Yes" <<  std::endl;
		}
		else{
			std::cout << "No" << std::endl;
		}
	}
}

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

int main(){
	const int N = 1000;
	int n;
	cin>>n;
		int a[N],b[N],c[N];
		for(int i=1;i<=n;i++){
			cin>>a[i]>>b[i]>>c[i];
		}
		for(int i=1;i<=n;i++){
			if(a[i]*a[i] + b[i]*b[i] == c[i]*c[i] || a[i]*a[i] == b[i]*b[i] + c[i]*c[i] || a[i]*a[i] + c[i]*b[i] == b[i]*c[i]){
				cout<<"YES"<<endl;
			}
			else cout<<"NO"<<endl;
		}
	
}

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 <string>
#include <vector>

using namespace std;

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

	int a, b, c, i;
	vector<string> res;
	for (i = 0; i < N; i++) {
		cin >> a >> b >> c;

		int aj = a * a;
		int bj = b * b;
		int cj = c * c;

		if (aj < bj) {
			if (bj < cj) {
				if (cj == aj + bj) {
					res.push_back("YES");
				}
				else {
					res.push_back("NO");
				}
			}
			else {
				if (bj == aj + cj) {
					res.push_back("YES");
				}
				else {
					res.push_back("NO");
				}
			}
		}
		else {
			if (aj < cj) {
				if (cj == aj + bj) {
					res.push_back("YES");
				}
				else {
					res.push_back("NO");
				}
			}
			else {
				if (aj == bj + cj) {
					res.push_back("YES");
				}
				else {
					res.push_back("NO");
				}
			}
		}
	}

	for (i = 0; i < res.size(); i++) {
		cout << res[i] << endl;
	}

	return 0;
}

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


using namespace std;

bool check(vector<int> n){
	if(n[0]*n[0]+n[1]*n[1]==n[2]*n[2])return true;
	else false;
}

int main(){
	int n;
	cin>>n;
	for(int i=0;i<n;i++){
		int a,b,c;
		vector<int> hoge;
		cin>>a>>b>>c;
		hoge.push_back(a);
		hoge.push_back(b);
		hoge.push_back(c);
		sort(hoge.begin(),hoge.end());
		cout<< ( check(hoge)==true ? "YES" : "NO")<<endl;
	}
	return 0;
}

C++: i;main(a,b,c){for(scanf("%*d"),i=4;i--&&~scanf("%d%d%d",&a,&b,&c);puts((a+b-c&&b+c-a&&a+c-b)?"NO":"YES"))a*=a,b*=b,c*=c;}

C++: #include <iostream>
#include <algorithm>
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[0] * a[0] + a[1] * a[1] == a[2] * a[2]) {
      cout << "YES\n";
    } else {
      cout << "NO\n";
    }
  }
  return 0;
}

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

using namespace std;

int main(){
	int n;

	cin >> n;
	
	for(int i = 0; i < n; i++){
		int tate,yoko,naname;
		cin >> tate >> yoko >> naname;

		if(tate > naname){
			swap(tate,naname);
		}

		if(yoko > naname){
			swap(yoko,naname);
	}

		if(naname * naname == tate * tate + yoko * yoko)
			cout << "Yes" << endl;
		else
			cout << "No" << endl;
	}
	return 0;
}

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

C++: #include<iostream>
#include<algorithm>
#include<vector>
#include<string>
int main() {
	double a, b, c;
	std::vector<std::string>v;
	while(std::cin>>a>>b>>c){
		double max = std::max(a, std::max(b, c));
		if (2*max*max==a*a+b*b+c*c ) {
			v.push_back  ("yes");
		}
		else {
			v.push_back  ("no");
		}
	}
	for (double n = 0; n < v.size(); ++n) {
		std::cout << v[n] << std::endl;
	}
	return 0;
}