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(void){

  int n;
  int triangle[3];

  cin >> n;

  while(n--){

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

  sort( triangle , triangle + 3 );

  if( triangle[2] * triangle[2] == triangle[1] * triangle[1] + triangle[0] * triangle[0] ) cout << "YES" << endl;
  else cout << "NO" << endl;
  }
  return 0;
}

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

using namespace std;

int main(){
  int a, b, c, a2, b2, c2;
  while(cin>>a>>b>>c){
    a2= a*a;
    b2= b*b;
    c2= c*c;

    if((a2+b2==c2)||(b2+c2==a2)||(a2+c2==b2)){
      cout<<"YES"<<endl;
    }else{
      cout<<"NO"<<endl;
    }
  }
  return 0;
}

C++: #include <cstdio>

int main() {
	int a,b,c,n;
	scanf("%d",&n);

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

C++: #include "StdAfx.h"
#include "AOJ0003.h"
#include <string>
#include <sstream>
#include <iostream>
#include <stack>
#include <queue>
#include <vector>
using namespace std;

vector<string> exinputstring(){
	vector<string> ss;
	string s;
	while(getline(cin,s) ){
		ss.push_back(s);
	}
	
	return ss;
}
vector<int> exinputint(){
	vector<int> ss;
	int d;
	while( !cin.eof() ) {
		cin >>d;
		ss.push_back(d);
	}
	return ss;
}

main(){
	vector<int> inp=exinputint();
	vector<int>::iterator it = inp.begin();
	for (it++;it != inp.end();){
		int a=*it;it++;
		int b=*it;it++;
		int c=*it;it++;
		if ((a>=b&&b>=c&&a*a==b*b+c*c)||
			(b>=a&&b>=c&&b*b==a*a+c*c)||
			(c>=a&&c>=b&&c*c==a*a+b*b)){
				cout<<"YES";}else{cout<<"NO";}

	}
}

C++: #include<stdio.h>
 
void right_triangle(int x, int y, int z);
 
int main(void)
{
    int n;
    scanf("%d", &n);
    int i = 0;
    int x, y, z;
    while (i < n) {
        scanf("%d %d %d", &x, &y, &z);
        right_triangle(x, y, z);
        i++;
    }
    return 0;
}
 
void right_triangle(int x, int y, int z)
{
    int i = x * x;
    int j = y * y;
    int k = z * z;
    if (i == j + k || j == k + i || k == i + j) {
        printf("YES\n");
    } else {
        printf("NO\n");
    }
}

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


int main(){
	int N;
	cin >> N;
	while(N--){
		int i[3],c;
		int max;
		cin >> i[0] >> i[1] >> i[2];
		sort(i,i+3);
		if(i[0]*i[0]+i[1]*i[1]==i[2]*i[2])
			cout<<"YES\n";
		else
			cout<<"NO\n";

	}
}

C++: #include<stdio.h>
/*複数のデータセットに対して、各々が直角三角形か
どうか判定する*/
void right_triangle(int x, int y, int z);

int main(void)
{
    int n;//nはデータセットの個数
    scanf("%d", &n);
    for ( int i = 0; i <n ; ++i){
    int a, b, c;//a,b,cは辺の長さ
    scanf("%d %d %d", &a, &b, &c);
    right_triangle(a , b, c);
    }
    return 0;
}    

void right_triangle( int x, int y, int z)
{
    x *= x;
    y *= y;
    z *= z;
    if (x == y + z|| y == z + x|| z == x + y){
        printf("YES\n");
    }else{
        printf("NO\n");
    }
}

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

bool judge_triangle(int j_edge[])
{
    std::sort(j_edge, j_edge + 3);
    return j_edge[2] * j_edge[2] == j_edge[0] * j_edge[0] + j_edge[1] * j_edge[1];
}

int main()
{
    int num;
    std::cin >> num; 

    for(int i = 0; i < num; i++) {

        int edge[3];
        std::cin >> edge[0] >> edge[1] >> edge[2];

        if(judge_triangle(edge)) {
            std::cout << "YES" << std::endl;
        } else {
            std::cout << "NO" << std::endl;
        }

    }
    return 0;
}

// "j_edge" to "j_edge+3" ha "array j_edge" no memory jyou no
// adress no hajimari to owari wo simesu. 
// Yoku miru to kou natteru ==> [hajimari, owari)

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

using namespace std;

int main(){
	int n;
	cin >> n;
	while(n--){
		int a, b, c, sum;
		cin >> a >> b >> c;
		int x, y ,z;
		x = max(a,max(b,c));
		y = min(a,min(b,c));
		z = sum - x - y;
		
		if(x*x == y*y + z*z)
			cout << "Yes" << endl;
		else
			cout << "No" << endl;
	}
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <math.h>

using namespace std;

int main(){
	
	int N;
	vector<int> a(3);
	cin>>N;
	while(N>0){
		for(int i=0;i<3;i++)
			cin>>a[i];
		sort(a.begin(),a.end());
		if(pow(a[2],2.0)==pow(a[1],2.0)+pow(a[0],2.0))
			cout<<"YES"<<endl;
		else
			cout<<"NO"<<endl;
		N--;
	}
	}

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

int main()
{
    double 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);
        a=que.top();
        que.pop();
        b=que.top();
        que.pop();
        c=que.top();
        que.pop();
        if (a*a+b*b==c*c) cout << "YES" << endl;
        else cout << "NO" << endl;
    }
    return 0;
}

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


return 0;
}

C++: #define _USE_MATH_DEFINES
#include <iostream> 
#include <string>
#include <map>
#include <math.h>
#include <vector>
#include <algorithm>
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+b <= c || a+c <= b || b+c <= a){
			cout << "NO" << endl;
		}
		else{
			cout << "YES" << endl;
		}
	}
	return 0;
}

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

char const *answer(int a,int b,int c){
	if(c*c == a*a+b*b || a*a == b*b+c*c || b*b == a*a+c*c)	return "YES";
	else		return "NO";
}

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

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

int main()
{
	vector <int> v_c;
	v_c.resize(3);
	double e =2.0;
	while(cin>>v_c[0] >>v_c[1]>>v_c[2])
	{
		sort(v_c.begin(),v_c.end(),greater<int>());
		if( pow(v_c[0],e) == (pow(v_c[1],e)+pow(v_c[2],e)))
		{
			cout << "YES"<<endl;
		} else {
			cout << "NO" << endl;
		}
	}
	return 0;
}

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

using namespace std;

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

int main()
{
	solve();
	return(0);
}