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 <stdio.h>
#include <math.h>

int main() {
	int N;
	int *a, *b, *c, *ans;
	scanf("%d", &N);

	a = new int[N];
	b = new int[N];
	c = new int[N];
	ans = new int[N];
	for(int i=0; i<N; i++) scanf("%d %d %d",&a[i],&b[i],&c[i]);

	for(int i=0; i<N; i++) {
		if(a[i]>=b[i] && a[i]>=c[i]) {
			if(b[i]*b[i]+c[i]*c[i] == a[i]*a[i]) ans[i] = 1;
			else ans[i] = 0;
		}
		if(b[i]>=a[i] && b[i]>=c[i]) {
			if(a[i]*a[i]+c[i]*c[i] == b[i]*b[i]) ans[i] = 1;
			else ans[i] = 0;
		}
		if(c[i]>=b[i] && c[i]>=a[i]) {
			if(b[i]*b[i]+a[i]*a[i] == c[i]*c[i]) ans[i] = 1;
			else ans[i] = 0;
		}
	}

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

	delete[] a;
	delete[] b;
	delete[] c;
	delete[] ans;

	return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<functional>
#include<vector>
#include<math.h>
#define L(_i,_N) for(int _i=0;_i<_N;_i++)
typedef long long int lli;
using namespace std;

int main() {
	int N,Line[3];
	cin >> N;
	L(i, N) {
		L(j, 3) cin >> Line[j];
		sort(Line, Line + 3);
		if (Line[0]*Line[0]+ Line[1] * Line[1] == Line[2] * Line[2]) cout << "Yes" << endl;
		else cout << "No" << endl;
	}
	return 0;
}

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

using namespace std;


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

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

int main(){

	int a[3];
	int i,j;

	std::cin >> j;

	for(i=0;i<j;i++){
		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<string>

using namespace std;

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

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

#define FOR(i,l,r) for(int i = (l);i < (r);i++)
#define ALL(x) (x).begin(),(x).end()
template<typename T> bool chmax(T& a,const T& b){return a < b ? (a = b,true) : false;}
template<typename T> bool chmin(T& a,const T& b){return b < a ? (a = b,true) : false;}
typedef long long ll;

int N;

int main()
{
	scanf("%d",&N);
	vector< vector<int> > A(N,vector<int>(3));
	FOR(i,0,N){
		scanf("%d%d%d",&A [i] [0],&A [i] [1],&A [i] [2]);
		sort(ALL(A [i]));
	}

	FOR(i,0,N){
		int x = A [i] [0],y = A [i] [1],z = A [i] [2];
		if(x * x + y * y == z * z){
			printf("Yes\n");
		}
		else{
			printf("No\n");
		}
	}

	return 0;
}

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

using namespace std;

int main () {
	int n;

	cin >> n;

	int henA, henB, henC;
	for (int i = 0; i < n; i++) {
		cin >> henA >> henB >> henC;

		if(henA, henC ) {			
			swap(henA, henC);
		}

		if(henB > henC ){
			swap(henB, henC);
	}

		if (henA * henA + henB * henB == henC * henC)
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}

	return 0;
}

C++: #include <stdio.h>
#include <math.h>
int main(void){
    int a,b,c;
    scanf("%d",&a);
    while(scanf("%d%d%d",&a,&b,&c)>0)printf(a*a+b*b==c*c?"YES\n":"NO\n");
    return 0;
}

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

int main()
{
    int a,b,c,data=0;
    int d[3]={};
    
    cin >> data;
    
    for (int i=0; data>i; i++) {

        cin >> d[0] >> d[1] >> d[2];
        
        sort(d,d+3);
        
        a=d[0];
        b=d[1];
        c=d[2];
        
        if (c*c == a*a+b*b) {
            cout << "YES";
        }else{
            cout << "NO";
        }
    }
}

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

using namespace std;
int main()
{
	int n;
	cin >> n;
	
	vector <int>a;
	for(int i=0;i<n;i++){
		for(int j=0,j<3,j++){
		int temp;
		cin >> temp;
		a.push_back(temp);
		sort(a.begin(),a.end());
		}
			
		if(a[1]*a[1]+a[2]*a[2]>=a[3]*a[3]){
			cout<< "YES" << endl;
		}else{
			cout<< "NO" << endl;
		}
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
    int n,a,b,c,i,j;
    cin>>n;
    n<1000;
    for(i=0;i<n;i++){
        cin>>a>>b>>c;
        if(a>1000||b>1000||c>1000){
            break;
        }
        if(b*b+a*a-c*c==0){
            cout<<"Yes"<<endl;
        }
        else{
            cout<<"No"<<endl;
        }
    }
    return 0;
}

C++: #define _USE_MATH_DEFINES
#include <cmath>

#include <iostream>
#include <string>

using namespace std;

int main()
{
	int n;
	unsigned int a,b,c;
	
	cin >> n;
	
	while (n)
	{
		cin >> a >> b >> c;
		int max, v1, v2;
		if (a > b && a > c)
		{
			if (pow(a, 2) == pow(b, 2) + pow(c, 2))
				cout << "YES" << endl;
			else
				cout << "NO" << endl;
		}
		else if (b > a && b > c)
		{
			if (pow(b, 2) == pow(a, 2) + pow(c, 2))
				cout << "YES" << endl;
			else
				cout << "NO" << endl;
		}
		else if (c > a && c > b)
		{
			if (pow(c, 2) == pow(a, 2) + pow(b, 2))
				cout << "YES" << endl;
			else
				cout << "NO" << endl;
		}
		else
		{
			cout << "NO" << endl;
		}
		
		n--;
	}
	return 0;
}

C++: #include <iostream>
#include <ccomplex>
#include <vector>
#include <cassert>
#include <utility>
#include <algorithm>
#include <string>
#include <deque>
#include <queue>
#include <functional>
#include <cmath>
#include <iomanip>
#include <map>
#include <numeric>
#include <list>
#include <assert.h>
#include <math.h>
#include <valarray>
#include <stdio.h>
#include <algorithm>
#include <set>
#include <complex>
#include <list>
#include <time.h>
#include <stack>
#include <locale>
#include <clocale>
#include <ctype.h>
#include <wchar.h>

using namespace std;
typedef long long int LL;
typedef pair<long long int, long long int> pii;
typedef pair<double, double> pdd;

#define SORT(c) sort((c).begin(),(c).end())
#define BACKSORT(c) sort((c).begin(),(c).end(),std::greater<LL>())
#define FOR(i,a,b) for(LL i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

int xcomp(vector<LL>& a, vector<LL>& b) {
	return a[0] < b[0];
}

#define XSORT(c) sort((c).begin(),(c).end(),xcomp)

#define ALL(x) (x).begin(),(x).end()
LL mod = 1000000007;

int main() {
	int N;
	cin >> N;
	REP(i, N) {

		vector<int> v(3, 0);
		cin >> v[0] >> v[1] >> v[2];
		SORT(v);
		if (v[0] * v[0] + v[1] * v[1] == v[2] * v[2]) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}
}

C++: #include<iostream>
using namespace std;
int main(){

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

	}
	
		
	
	
return 0;
}