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 <algorithm>
#include <string>
#include <vector>
 
#define MAX 1000
#define MIN 1
 
using namespace std;
 
int main() {
 int i = 0,j;
 int n;
 int side[3];
 bool cnt;
 vector<string> judge;
 
 cin >> n;
 
 while(i < n) {
  cnt = false;

  cin >> side[0] >> side[1] >> side[2];
 
  for(j = 0;j < 3;++j) {
   if((side[j] < MIN) || (side[j] > MAX)) {
    cnt = true;
   }
  }
 
  if(cnt == true) continue; 
 
  sort(side, side + 3);
 
  if(((side[0] % 3) == 0) && ((side[1] % 4) == 0) && ((side[2] % 5) == 0)) {
   judge.push_back("YES");
  } else {
   judge.push_back("NO");
  }

  ++i;
 }
 
 for(i = 0;i < judge.size();++i) {
  cout << judge.at(i) << endl;
 }
 
 return 0;
}

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

int main(){
	int a[3];
	for(int i = 0; i < 3; i++){
	cin >> a[i] ;
	}

	sort(a, a+3);
	if(a[2]*a[2] == a[0]*a[0] + a[1]*a[1]) cout << "YES" << endl;
	else cout << "NO" << endl;

	return 0;
}

C++: #include<stdio.h>
#include<math.h>
#include<iostream>



int main(void){

	int n,i;
	double x[1000], y[1000], z[1000], a[1000],aa[1000],aaa,xa[1000],ya[1000],za[1000];

	a[0] = 3;
	
	double tmp;

	std::cin >> n;
	i = 0;

	for (i = 0; i < n; i++) {
		

		

		std::cin >> x[i];
		std::cin >> y[i];
		std::cin >> z[i];


		if(x[i] < y[i]){

			tmp = y[i];
			y[i] = x[i];
			x[i] = tmp;
			

		}
		if(y[i] < z[i]){

			tmp = z[i];
			z[i] = y[i];
			y[i] = tmp;
			

		}if(x[i] < y[i]){

			tmp = y[i];
			y[i] = x[i];
			x[i] = tmp;
			

		}
		if(y[i] < z[i]){

			tmp = z[i];
			z[i] = y[i];
			y[i] = tmp;
			

		}
		
		
		
		
		ya[i] = y[i] * y[i];
		xa[i] = x[i] * x[i];
		za[i] = z[i] * z[i];
		aaa = ya[i] + za[i];

		if (aaa == xa[i]) aa[i] = 1;
		else aa[i] = 0;	

		

		



	}

	

	for (i = 0; i < n; i++) {

		if(aa[i] == 0)printf("NO\n");
		if(aa[i] == 1)printf("YES\n");

		


	}



	return 0;





}

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

int cmpint(const void *a, const void *b){
	return (*(int*)b - *(int*)a);
}

int main(void){
	int len = 0;
	scanf("%d", &len);
	int a[3];
	for(int i=0; i<len;++i){
		scanf("%d %d %d", a, a+1, a+2);
		qsort(a, 3, sizeof(int), cmpint);
		if(a[0]*a[0] == (a[1]*a[1] + a[2]*a[2])){
			puts("YES");
		}else{
			puts("NO");
		}
	}
	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <boost/array.hpp>

int main()
{
	int N;
	std::cin >> N;
	for (int i = 0; i < N; ++i) {
		boost::array<int, 3> sides;
		std::cin >> sides[0] >> sides[1] >> sides[2];
		std::sort(sides.begin(), sides.end());
		std::cout << (sides[0] * sides[0] + sides[1] * sides[1] == sides[2] * sides[2] ?
				"YES" : "NO") << std::endl;
	}
	return 0;
}

C++: //
// Created by tac on 2016/10/27.
//

#include <cstdlib>
#include <iostream>

namespace {

bool is_traiangle(int a, int b, int c) {
    int a1, b1, c1;
    if (a >= b && a >> c) {
        a1 = a;
        b1 = b;
        c1 = c;
    } else if (b >= a && b >= c) {
        a1 = b;
        b1 = a;
        c1 = c;
    } else {
        a1 = c;
        b1 = a;
        c1 = b;
    }
    return (a1 < b1 + c1) && (a1 * a1 == b1 * b1 + c1 * c1);
}

}


int main() {
    int n;
    int a, b, c;
    std::string ans;
    std::cin >> n;
    for (int i = 0; i < n; ++i) {
        std::cin >> a >> b >> c;
        if (is_traiangle(a, b, c)) {
            ans = "YES";
        } else {
            ans = "NO";
        }
        std::cout << ans << std::endl;
    }
    return EXIT_SUCCESS;
}

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<stdio.h>
int main(void)
{
	int n,i,w,a,s,d,x,j,z;
		scanf("%d",&n);
		for(i=0;i<n;i++){
			scanf("%d %d %d",&a,&s,&d);
			if(a>s&&d<a){
				w=(d*d)+(s*s);
				x=a*a;
					if(w==x){
						printf("YES\n");
					}
					else{
						printf("NO\n");
					}	
			}	
			else if(a<d&&d>s){
				w=(a*a)+(s*s);
				x=d*d;
					if(w==x){
						printf("YES\n");
					}
					else{
						printf("NO\n");
					}				
			}
			else if(a<s&&s>d){
				w=(d*d)+(s*s);
				x=s*s;
					if(w==x){
						printf("YES\n");
					}
					else{
						printf("NO\n");
					}				
			}
			else if(a==s&&s==d&&d==a||a==s||s==d||d==a){
				printf("NO\n");
			}	
		
		}
	return 0;
}

C++: #include<stdio.h>
int main()
{
int n,x[3],i,t;
scanf("%d",&n);
while(n--){
scanf("%d %d %d",&x[0],&x[1],&x[2]);

for(i=1;i<3;i++){
if(x[0]<x[i]){
t=x[0];
x[0]=x[i];
x[i]=t;
}
}
if((x[0]*x[0])==(x[1]*x[1]+x[2]*x[2]))
printf("YES\n");
else
printf("NO\n");


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

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

int main() {
	ios :: sync_with_stdio(false);
	int t; cin >> t;
	while(t --) {
		int a, b, c;
		cin >> a >> b >> c;
		if(f(a, b, c) || f(b, c, a) || f(c, a, b))
			cout << "YES\n";
		else
			cout << "NO\n";
	}
	return 0;
}

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

using namespace std;

int main()
{
	int n;
	int deta[3];
	int square;

	cin >> n;
	
	for (int i = 0; i < n; i++){
		for (int j = 0; j < 3; j++){
			cin >> deta[j];
		}
		
		sort (deta, deta + 3);

		square = (deta[0] * deta[0]) + (deta[1] * deta[1]);

		if (square == deta[2] * deta[2]){
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}

	return 0;
}

C++: #include<iostream>
using namespace std;
int main() {
	int N,a,b,c;
	cin >> N;
	for (int i = 1; i <= N; i++) {
		cin >> a >> b >> c;
		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;
		}
	}
}

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

C++: #include"iostream"
using namespace std;
int main()
{
	int a, b, c, d;
	cin >> a;
	for (; a >= 1; a--)
	{
		cin >> b >> c >> d;
		if (b > (b + c + d) / 2.0 || c > (b + c + d) / 2.0 || d > (b + c + d) / 2.0)
			cout << "NO" << endl;
		else
			cout << "YES" << endl;
	}
	return 0;
}

C++: #include<cstdio>

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