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>

using namespace std;

int main(){
  int n;
  int a,b,c;
  int tmp;
  cin >> n;
  for(int i=0;i<n;i++)
    {
      cin >> a >> b >> c;
    }

  if(a>c){
    tmp=a;
    a=c;
    c=tmp;
  }
  if(b>c){
    tmp=b;
    b=c;
    c=tmp;
  }

  if(a*a+b*b==c*c)
    cin >> YES >> endl;
  else
    cin >> NO >> endl;
  return 0;
}

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

C++: #include <iostream>

using namespace std;


//辺の長さが、a,b,cも時、三角形ができるかどうかを判定。できる場合はYESを返し、できない場合はNOを返す。
void judge_triangle(int a,int b,int c){
  int max = 0;
  bool flag = false;


  if( a*a+b*b==c*c || b*b+c*c==a*a || c*c+a*a == b*b){
    flag = true;
  }

  if(flag == true){
    cout <<"YES\n";
  }else {
    cout <<"NO\n";
  }

}

int main(){
  int data_length;
  int sides_length[] ={ -1,-1,-1};
  int i,j;

  cin >> data_length;

  for(i = 0;i < data_length;i++){
    for(j = 0;j<3;j++){
      cin >> sides_length[j];
      if(j==2){
        judge_triangle(sides_length[0],sides_length[1],sides_length[2]);
      }
    }
  }

  return 0;
}

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(a>b){swap(a,b);}
		if(b>c){swap(b,c);}
		if(a>b){swap(a,b);}
		if(a*a+b*b==c*c){
			cout<<"YES"<<endl;
		}
		else {
			cout<<"NO"<<endl;
		}

	}
return 0;
}

C++: #include <iostream>
using namespace std;
 
int main()
{
   int a,b,c,x, y, z,n;
 
   // read in n 
   cin>>n;

   // for n set of data, read into 3 sides 
   
   for(int i=1;i<=n;i++)
   {
      cin>>a>>b>>c;          
      x=a*a; y=b*b; z=c*c;
      
      // check if they are triangle
      if(x+y==z||x+z==y||y+z==x)
          cout<<"YES"<<endl;
      else
          cout<<"NO"<<endl;
    }   
    return 0;
}

C++: #include <stdio.h>

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

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

using namespace std;

int main(){

int n;
cin>>n;

for(int i=0;i<n;i++){
int tri[3];

cin>>tri[0]>>tri[1]>>tri[2];
sort(tri,tri+3);

if(tri[0]%1==0 && tri[1]%1==0 && tri[2]%2==0) cout<<"YES"<<endl;
else if(tri[0]%1==0 && tri[1]%3==0 && tri[2]%4==0) cout<<"YES"<<endl;
else if(tri[0]%3==0 && tri[1]%4==0 && tri[2]%5==0) cout<<"YES"<<endl;
else if(tri[0]%5==0 && tri[1]%12==0 && tri[2]%13==0) cout<<"YES"<<endl;
}

return 0;

}

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

}

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

C++: #include<iostream>
#include<vector>
using namespace std;
int main(){
  int a,b,c,N;
  cin >> N;
  //vector<int> v;
  //while (cin >> a >> b >> c){
  //v.push_back(a,b,c);
  //  }
  //int x = a + b;
  //int y = b + c;
  //int z = c + a;
  //if (x => c || y => a || z => b){
  //cout << "NO" << endl;
  //} else if(x < c || y < a || z < b){
  //cout << "YES" << endl;
  //}
  while(N>0){
    cin >> a;
    cin >> b;
    cin >> c;
    int x = a + b;
    int y = b + c;
    int z = c + a;
    if (x <= c || y <= a || z <= b){
      cout << "NO" << endl; 
      N = N - 1;  
    }else if(x > c || y > a || z > b){
      cout << "YES" << endl;
      N = N - 1;
    }
  }
  return 0;
}

C++: #include <bits/stdc++.h>
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++: #include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<ctime>
#include<cctype>
#include<climits>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<memory>
#include<functional>

#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define llong long long
#define pb(a) push_back(a)
#define INF 999999999
using namespace std;

typedef vector<int> vi;
typedef vector<long long> vl;
typedef vector<double> vd;
typedef pair<int, int> pii;
typedef pair<long, long> pll;
typedef long long ll;

int dy[] = { 0, 0, 1, -1, 0 };
int dx[] = { 1, -1, 0, 0, 0 };

int main(){
	ios::sync_with_stdio(false);

	vi len(3);
	int a, b;
	int n;

	cin >> n;

	REP(i, n){
		cin >> len[0] >> len[1] >> len[2];

		VSORT(len);
		a = len[0] * len[0] + len[1] * len[1];
		b = len[2] * len[2];

		if (a == b)
			puts("YES");
		else
			puts("NO");
	}
}

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

void swap(int *,int *);

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

void swap(int *a,int *b){
	int work;
	work=*a;
	*a=*b;
	*b=work;
}

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

int pow2(int i) {
	return std::pow(i, (double) 2);
}

int main() {
	int in[3];
	while (std::cin >> in[0] >> in[1] >> in[2]) {
		std::sort(in, in + 3);
		if (pow2(in[2]) == pow2(in[0]) + pow2(in[1]))
			std::cout << "YES" << std::endl;
		else
			std::cout << "NO" << std::endl;
	}
}

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