Go: package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
	"sort"
	"strconv"
	"strings"
)

var (
	sc = bufio.NewScanner(os.Stdin)
)

func main() {
	sc.Scan()
	n, _ := strconv.Atoi(sc.Text())
	for i := 0; i < n; i++ {
		sc.Scan()
		edges := make([]int, 3, 3)
		for i, c := range strings.Split(sc.Text(), " ") {
			edges[i], _ = strconv.Atoi(c)
			edges[i] = int(math.Pow(float64(edges[i]), 2))
		}
		sort.IntSlice(edges).Sort()
		msg := "NO"
		if edges[2] == edges[0]+edges[1] {
			msg = "YES"
		}
		fmt.Println(msg)
	}
}

C++: #include <iostream>

char detClass(int pm, int pe, int pj)
{
	
	int mean = pm + pe + pj;
	if((pm == 100) | (pe == 100) | (pj == 100)) {
		return 'A';
	} else if( (pm + pe) >= 180) {
		return 'A';
	} else if( mean >= 240) {
		return 'A';
	} else if( mean >= 210) {
		return 'B';
	} else if( (mean >= 150) && ((pm >= 80) | (pe >= 80))) {
		return 'B';
	} else {
		return 'C';
	}
}

int main()
{
	int n, pm, pe, pj = 0;
	
	while(true) {
		std::cin >> n;
		if(n == 0) {
			break;
		}
		for(int i = 0; i < n; i++) {
			std::cin >> pm >> pe >> pj;
			std::cout << detClass(pm,pe,pj) << std::endl;
		}
	}
	return 0;	
}

C++: #include<iostream>
using namespace std;
int main(){
    int n,a,b,c,i,j;
    cin>>n;
    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++: # include <iostream>
# include <algorithm>

int n;
int edge[3];

int main() {
	std::cin >> n;
	for (int i = 0; i < n; ++i) {
		for (int j = 0; j < 3; ++j)
			std::cin >> edge[i];
		std::sort(edge, edge + 3);

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

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

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n;
    cin>>n;
    for(int i=0; i<n; i++){
        int a, b, c;
        cin>>a>>b>>c;
        if(a>b) swap(a, b);
        if(b>c) swap(b, c);
        if(a*a+b*b==c*c) cout<<"YES\n";
        else cout<<"NO\n";
    }
    return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;


#define REP(i,n) for(ll i=0;i<n;++i)
#define RREP(i,n) for(ll i=n-1;i>=0;--i)
#define FOR(i,m,n) for(ll i=m;i<n;++i)
#define RFOR(i,m,n) for(ll i=n-1;i>=m;--i)
#define ALL(v) (v).begin(),v).end()

#define PB(a) push_back(a)
#define MOD 1000000007

typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> VI;
typedef vector<VI> VVI;
const double PI = 3.14159265358979323846;
const double EPS = 1e-12;
const int INF = numeric_limits<int>::max() / 2;
const int NEG_INF = numeric_limits<int>::min() / 2;

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);

  int n;cin>>n;
  std::vector<int> v(3);
  for(int i=0;i<3;i++) cin>>v[i];
  sort(v.begin(),v.end());
  if(v[0]+v[1]>v[2]) cout<<"YES"<<endl;
  else cout<<"NO"<<endl;
  return 0;
}

C++: #include<iostream>
int main(){
	using namespace std;
	int j,n,leng[1000];
	cin>>n;
	for(int i=0;i<n;++i){
		cin>>leng[3*i]>>leng[(3*i)+1]>>leng[(3*i)+2];
		for(int a=0;a<3;++a)
        for(int b=a+1;b<3;++b)
            if(leng[(3*i)+a]>leng[(3*i)+b])j=leng[(3*i)+a],leng[(3*i)+a]=leng[(3*i)+b],leng[(3*i)+b]=j;

	}

	for(int i=0;i<n;++i){
		if((leng[3*i]^2)+(leng[(3*i)+1]^2) == (leng[(3*i)+2]^2))cout<<"YES"<<endl;
		else cout<<"NO"<<endl;
	}
		return 0;
}

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

int main() {

//変数の宣言

	vector<int> a;
	int i,j,n,temp;


/////メイン処理/////

	cin >> n;
	
	for(j=0;j<n;j++){ 
//入力
		for(i=0;i<3;i++){
			cin >> temp;
			a.push_back(temp);
		}
		sort(a.begin(),a.end());
		
//出力
		if (a[0]*a[0] + a[1]*a[1] == a[2]*a[2]) {
			cout << "YES" <<endl;
		}else{
			cout << "NO" <<endl;
		}
		
	}
	
	return 0;
}

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

int main()
{
    int TestCase;
    cin >> TestCase;

    string Answer [1000];

    for (int x = 0; x <  TestCase ; x++)
        {
            int a;
            int b;
            int c;
            int o;
            int p;

            cin >> a >> b >> c;

            /* a < b < c */
            if (a < b)
            {
                o = b;
                b = a;
                a = o;
            }
            if (a < c)
            {
                p = c;
                c = a;
                a = p;
            }
            if (c*c + b*b == a*a)
            {
                Answer [x] = "YES";
            }
            else
            {
                Answer [x] = "NO";
            }

        }
    for (int y = 0; y < TestCase; y++)
    {
        cout << Answer [y] << endl;
    }


    return 0;
}

C++: #include <stdio.h>
#include <math.h>
#include <queue>
#include <vector>
using namespace std;
 
int main()
{
    double a,b,c;
    int n,i;
    priority_queue< double, vector<double>, greater<double> > que;
 
    scanf("%d",&n);
 
    for(i = 0; i < n; i++){
        scanf("%lf %lf %lf",&a,&b,&c);
        que.push(a);
        que.push(b);
        que.push(c);
        a = que.top();
        que.pop();
        b = que.top();
        que.pop();
        if(pow( que.top(),2.0 ) == pow( a,2.0 ) + pow( b,2.0 )){
            printf("YES\n");
        }
        else{
            //printf("%lf %lf\n",pow( que.top(),2.0 ),pow( a,2.0 ) + pow( b,2.0 ));
            printf("NO\n");
        }
        que.pop();
    }
 
    return 0;
}

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

int main() {
	int data_sets_num;		//??\???????????????????????????????????°
	std::vector<string> result;
	
	for (int i = 0; i < data_sets_num; i++) {
		int first, second, third;

		cin >> first >> second >> third;
		if (
			(first * first == second * second + third * third) ||
			(second * second == first * first + third * third) ||
			(third * third == second * second + first * first)
			) {
			result.push_back("YES");
		}
		else {
			result.push_back("NO");
		}
	}

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

	return 0;
}

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

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

using namespace std;

int main() {
	int kaisu;
	int x,y,z;
	int kekka;
	
	cin >> kaisu;
	
	for(int i = 1; i <= kaisu; i++){
	cin >> x >> y >> z;
	int array[3];
	array[0] = x;
	array[1] = y;
	array[2] = z;
		if( array[0] < array[1] ){
		swap(array[0],array[1]);
		}
		if( array[0] < array[2] ){
		swap(array[0],array[2]);
		}
		if( array[1] < array[2] ){
		swap(array[1],array[2]);
		}
	kekka = ((array[1]*array[1]+array[2]*array[2])-array[0]*array[0])/2*array[1]*array[2];
	if (kekka == 0){
	cout << "YES"<<endl;
	}
	else {
	cout << "NO"<<endl;
	}
	}

	
    return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
 
#define MAX 1000
#define MIN 1
 
using namespace std;
 
bool right(int a,int b,int c) {
 if(((a * a) + (b * b)) == (c * c)) {
  return true;
 } else {
  return false;
 }
}

int main() {
 int i = 0,j;
 int n;
 int side[3];
 bool cnt = false;
 vector<string> judge;
 
 cin >> n;
 
 while(i < n) {
  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((right(side[0],side[1],side[2]) == true) {
   judge.push_back("YES");
  } else {
   judge.push_back("NO");
  }

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