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>
#include<string>
#include<cmath>
using namespace std;
int main() {
	int n;
	cin >> n;
	for (int i=0;i < n;i++) {

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



	
		
		
		
	}
}

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

int main() {
	int x, n, m, l;
	vector<string> v;
	
	cin >> x;

	for(int i = 0; i < x; i++) {
		cin >> n >> m >> l;

		if(l*l == n*n + m*m) {
			v.push_back("Yes");
		} else {
			v.push_back("No");
		}
	}

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

	return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<string>
using namespace std;
int main(){
	int N;cin>>N;
	for(int i=0;i<N;i++){
		int a[3];
		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"<<endl;
		else cout<<"NO"<<endl;
	}
	return 0;
	}

C++: //
//  main.cpp
//  b
//
//  Created by h3037178 on 2017/07/31.
//  Copyright ?? 2017??´ ?????£?????????. All rights reserved.
//

#include <iostream>
#include<algorithm>
#include<math.h>
using namespace std;
int main(){
    int n,a,i[3],f[3];
    cin>>n;
    if(n>1000){
        break;
    }
    for(int l=0;l<n;l++){
                for(a=0;a<3;a++){
            cin>>i[a];
            f[a]=i[a]^2;
        }
        if(i[a]<=0||i[a]>1000){
                break;
            }
        sort(f,f+3);
        if(f[2]==f[0]+f[1]){
            cout<<"YES"<<endl;
        }else{
            cout<<"NO"<<endl;
        }
    }
}

C++: #include <iostream>
#include <cmath>
#define REP(i,n) for(int i=0;i<n;i++)
using namespace std;

int main()
{
    int a,b,c,N;
    priority_queue< double, vector<double>, greater<double> > que;
    cin >> N;
    REP(i,N) {
        cin >> a >> b >> c;
        que.push(a);que.push(b);que.push(c);
        c=que.top();
        que.pop();
        b=que.top();
        que.pop();
        a=que.top();
        que.pop();
        if (a*a+b*b==c*c) cout << "YES" << endl;
        else cout << "NO" << endl;
    }
    return 0;
}

C++: #include <iostream>

using namespace std;

void solve(int a, int b, int c) {
	bool f = false;
	if (a + b > c) f = true;
	else if (a + c > b) f = true;
	else if (b + c > a) f = true;
	if (f) cout << "YES" << endl;
	else cout << "NO" << endl;
}

int main() {
	int num, a, b, c;
	cin >> num;
	for (int i=0; i<num; i++) {
		cin >> a >> b >> c;
		solve(a,b,c);
	}
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int a[1007],b[1007],c[1007],d,n;


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

C++: #include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include<iomanip>
#include <cmath>
#include <queue>
#include <stack>
#include <map>
#include <cstdio>

using namespace std;

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

C++: 

#include<iostream>
using namespace std;

int main(){
	int edge[3];	// ??\????????????
	int max = 0;	// ???????????§???????????????????????????
	int sum = 0;	// ??????????????????
    int num;    // ????????????????????°
	int i,j;
    
    cin >> num; // ????????????????????°??????????????????
	for (j=0; j<num; j++) {
        
        // input 3 edges.
        for( i=0;i<3 ;){
            cin >> edge[i];
            // ?????¶ : 0 <= ???????????? <= 1000
            if(edge[i] < 0  ||  edge[i] > 1000){
                continue;
            }
            i++;
        }
        
        // ?????????????????§????????????
        for(i=1,max=0;i<3;i++){
            if(edge[i] > edge[max]){	max = i;    }
        }
        
        // ??????????????????????±??????????
        for(i=0,sum=0 ;i<3;i++){
            if(i != max){	sum += edge[i] * edge[i];   }
		}
        
        // output
        if(edge[max] * edge[max] == sum){	cout << "YES\n";	}
        else{	cout << "NO\n";	}
	}
    
	return 0;
}

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

bool right_triangle(int x, int y, int z); 

int main(void)
{
    int n, a, b, c;
    scanf("%d",&n);
    for(int i = 0; i < n; i++){
        scanf(%d %d %d, &a, &b, &c);
        if(right_triangle(a, b, c)){
            printf("YES\n");
        }else{
            printf("NO/n");
        }
    return 0;
}

bool right_triangle(int x, int y, int z)
{
    if(x*x + y*y = z*z || x*x +  z*z = y*y || z*z+ y*y = x*x ){
        return true;
    }
    return false;
}

C++: #include<algorithm>
#include<functional>
#include<cmath>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<string>
#include<sstream>
#include<iostream>
#include<iomanip>
#include<vector>
#include<list>
#include<stack>
#include<queue>
#include<map>
#include<set>
#include<bitset>

#define all(c) (c).begin(), (c).end()
#define rep(i,n) for(int i=0;i<(n);i++)
#define pb(e) push_back(e)
#define mp(a, b) make_pair(a, b)
#define fr first
#define sc second

typedef unsigned long long ull;
typedef long long ll;

const int INF=100000000;
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};

using namespace std;

typedef pair<int ,int > P;

int n;

int main()
{
	cin>>n;
	rep(i,n)
	{
		vector<int> vec;
		int a,b,c;
		cin>>a>>b>>c;
		vec.pb(a);
		vec.pb(b);
		vec.pb(c);
		sort(all(vec));

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


	}
	


	return 0;
}

C++: #include<iostream>
using namespace std;
int main()
{
	int n;
	cin >> n;
	for (int i = 0; i < n; i++) {
		int a, b, c;
		cin >> a >> b >> c;
		if (a ^ 2 == b ^ 2 + c ^ 2 || b ^ 2 == a ^ 2 + c ^ 2 || c ^ 2 == a ^ 2 + b ^ 2) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}
	return 0;
}

C++: 
#include<iostream>
#include<stdio.h>
#include<algorithm>
#include<math.h>
using namespace std;
int main()
{
	int n,a,b,c,a1,b2,c2;
	cin>>n;
	for(int i=0;i<n;i++)
	{
		cin>>a>>b>>c;
		a1=pow(a,2);
		b2=pow(b,2);
		c2=pow(c,2);
		if(a1+b2==c2)
			cout<<"YES"<<endl;
		if(a1+c2==b2)
			cout<<"YES"<<endl;
		if(a1+c2==b2)
			cout<<"YES"<<endl;
		if(a1+b2!=c2&&a1+c2!=b2&&a1+c2!=b2)
			cout<<"NO"<<endl;
	}
				
	return 0;
}

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

#define SQ(x) ((x)*(x))

using namespace std;

int a[3];

int main()
{
  int n;
  scanf("%d", &n);
  while(n--){
    for(int i=0;i<3;i++)
      scanf("%d", a+i);

    sort(a, a+3);
    puts(SQ(a[0])+SQ(a[1]) == SQ(a[2])?"YES":"NO");
  }
  return 0;
}