Go: package main

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

func sliceAtof64(sa []string) ([]float64, error) {
	si := make([]float64, 0, len(sa))
	for _, a := range sa {
		i, err := strconv.ParseFloat(a, 64)
		if err != nil {
			return si, err
		}
		si = append(si, i)
	}
	return si, nil
}

func answer(ans bool) {
	if ans {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}
func isRightTriangle(ary []float64) (ans bool) {
	sort.Sort(sort.Reverse(sort.Float64Slice(ary)))
	ans = math.Pow(ary[1], 2.0)+math.Pow(ary[2], 2.0) == math.Pow(ary[0], 2.0)

	return
}

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	lineCount, _ := strconv.Atoi(scanner.Text())
	lines := make([]string, lineCount)

	for i := 0; i < lineCount; i++ {
		scanner.Scan()
		lines[i] = scanner.Text()
	}

	for _, v := range lines {
		ary, _ := sliceAtof64(strings.Split(v, " "))
		answer(isRightTriangle(ary))
	}
}

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

int main()
{
	double a, b, c;
	int n;

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

		if (pow(a, 2)  == pow(b, 2) + pow(c, 2)
			||pow(b, 2)  == pow(c, 2) + pow(a, 2)
			||pow(c, 2)  == pow(a, 2) + pow(b, 2))
		{cout << "YES" << endl;}
		else {cout << "NO" << endl;}
	}

	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
  int n;
  cin >>n;
  while(n--){
    int edge[3];
    for(int i=0; i<3; i++){cin >>edge[i];edge[i] = edge[i]*edge[i];}
    if(edge[0] == edge[1]+edge[2] || edge[1] == edge[2]+edge[0] || edge[2] == edge[0]+edge[1]) cout <<"YES"<<endl;
    else cout <<"NO"<<endl;
  }
  return 0;
}

C++: #include "stdio.h"

int main()
{
	int a, b, c, n;

	scanf("%d", &n);

	for (int i = 0; i < n; i++){
		scanf("%d %d %d", &a, &b, &c);

		a *= a;
		b *= b;
		c *= c;

		if(c == a+b || b == a+c || a == b+c) printf("YES\n");
		else printf("NO\n");
	}

	return 0;
}

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

class Triangle{
public:
Triangle(){
}
void push(int num1,int num2,int num3){
if(num1>=num2){
if(num1>=num3){c=num1;a=num2;b=num3;}
else{c=num3;a=num1;b=num2;}
}
else{
if(num2>=num3){c=num2;a=num1;b=num3;}
else{c=num3;a=num1;b=num2;}
}
};
void checkRight(){
int cs=c*c;
if(cs==a*a+b*b) ans=1;
else ans=0;
};

void print(){
if(ans==0)
cout <<"NO"<< endl;
if(ans==1)
cout <<"YES"<< endl;
}

protected:
int a,b,c,ans;
};

int main(){
int num,a,b,c;
	Triangle *tri /* = Triangle[1000]*/;
	cin >> num;
	tri = new Triangle[num]/*(a,b,c)*/;
	for(int n=0;n<num;n++){
	cin >> a;
	cin >> b;
	cin >> c;
	tri[n].push(a,b,c);
	}
for(int n=0;n<num;n++){
tri[n].checkRight();
tri[n].print();
}
return 0;
}

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

int main() {
    
    int length[3];
    int a,b,c;
    
    while(cin >> length[0] >> length[1] >> length[2]) {
        sort(length,length + 3,greater<int>());
        if(length[0] <= 1000) {
            a = length[2] * length[2];
            b = length[1] * length[1];
            c = length[0] * length[0];
        
            if(a + b == c)cout << "YES" << endl;
            else cout<< "NO" << endl;
        }
    }
    return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main()
{
	int a;
	  cin>>a;
	  for(int b =0;b<a;b++){
	  int c[3];
	  cin>>c[0]>>c[1]>>c[2];
	  sort(c,c+3);
	  if(c[0]*c[0]+c[1]*c[1]==c[2]*c[2])
	  cout<<"YES"<<endl;
	  else cout<<"NO"<<endl;}
}

C++: #include <bits/stdc++.h>
#define LL long long
#define ULL unsigned long long
#define rep(i, n) for (int i=0; i<(n); i++)
#define rep2(i, x, n) for (int i=x; i<(n); i++)
using namespace std;
int main(){
	
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	int n;
	cin >> n;
	
	rep(i,n){
		int a, b, c;
		cin >> a >> b >> c;
		cout << ( ( a ^ b ) == c ? "NO" : a*a + b*b == c*c ? "YES" : "NO" ) << endl;
	}
	return 0;
}

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

int main(){
	int a,b,c,n,t;
	cin>>n;
	for(int i=0;i<n;i++){
		cin>>a>>b>>c;
		if(a<b){
			t=a;
			a=b;
			b=t;
		}
		if(a<c){
			t=a;
			a=c;
			c=t;
		}
		cout<<(a*a==b*b+c*c ? "YES\n" : "NO\n");
	}
	return 0;
}

C++: #include "bits/stdc++.h"

#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 UNIQUE(v) v.erase(unique(ALL(v)),v.end());
#define DUMP(v) REP(i, (v).size()) { cout << v[i]; if (i != v.size() - 1)cout << " "; else cout << endl; }
#define INF 1000000001ll
#define MOD 1000000007ll
#define EPS 1e-9

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


using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<vi> vvi;
typedef vector<vl> vvl;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
ll max(ll a, int b) { return max(a, ll(b)); }
ll max(int a, ll b) { return max(ll(a), b); }
///(テつエテ」ツδサテ渉嘉」ツδサ`)(テつエテ」ツδサテ渉嘉」ツδサ`)(テつエテ」ツδサテ渉嘉」ツδサ`)(テつエテ」ツδサテ渉嘉」ツδサ`)(テつエテ」ツδサテ渉嘉」ツδサ`)(テつエテ」ツδサテ渉嘉」ツδサ`)///
int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	int n;
	cin >> n;
	vi v(3);
	REP(i, n) {
		cin >> v[0] >> v[1] >> v[2];
		sort(ALL(v));
		if (v[2] * v[2] == v[1] * v[1] + v[0] * v[0])cout << "YES" << endl;
		else cout << "NO" << endl;
	}

	return 0;
}

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

int main(){

	int a[3];

	while(std::cin >> a[0] >> a[1] >> a[2]){
		std::sort(a,a+3);
		if(a[2]*a[2]==a[0]*a[0]+a[1]*a[1]){
			std::cout << "Yes" << std::endl;
		}
		else{
			std::cout << "No" << std::endl;
		}
	}
}

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


int main()
{
	int a[3] ,n;
	vector<bool> dst;
	cin >> n;
	while (n-- > 0) {
		cin >> a[0] >> a[1] >> a[2];
		sort(a, a + 3);
		dst.push_back(a[0]*a[0] + a[1]*a[1] == a[2] * a[2]);
	}
	for (vector<bool>::iterator it = dst.begin(); it < dst.end(); it++)
		cout << ((*it)?"YES":"NO") << endl;
	return 0;
}

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


using namespace std;

bool check(vector<int> n){
	if(n[0]*n[0]+n[1]*n[1]==n[2]*n[2])return true;
	else false;
}

int main(){
	int n;
	cin>>n;
	for(int i=0;i<n;i++){
		int a,b,c;
		vector<int> hoge;
		cin>>a>>b>>c;
		hoge.push_back(a);
		hoge.push_back(b);
		hoge.push_back(c);
		sort(hoge.begin(),hoge.end());
		cout<< ( check(hoge)==true ? "YES" : "NO")<<endl;
	}
	return 0;
}

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

using namespace std;

int main(){
	int n,a,b,c;
	int m=0;
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		int a[3];
		for(int j=0;j<3;j++)scanf("%d",&a[j]);
		std::sort(a,a+3);
		
		m=max(m,a[2]);
		if(a[0]>9 || a[1]>9 || a[2]>9)puts("hogehogehoge");
		int s = 9;
		if(a[0]*a[0]+a[1]*a[1] == a[2]*a[2]){
			if(m<=s)puts("YES");
			else puts("NO");
		}else{
			if(m<=s)puts("NO");
			else puts("YES");
		}
	}
}

C++: #include <iostream>
//#include <cstdio>
//#include <cmath>
using namespace std;
 
//0003
int main(){
	int n;
	int a, b, c, a2, b2, c2;
	cin >> n;
	while(n--){
		cin >> a >> b >> c;
		a2 = a^2;
		b2 = b^2;
		c2 = c^2;

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

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

int main(){
	int n=0,i=0,k=0,a,b;
	int x[100] = {0} ;
	char y[100] ={0} ;

	cin >> n ;

	for(i=0;i<3*n;i+=3){
		cin >> x[i] >> x[i+1] >> x[i+2] ;

		if(x[i+1] > x[i]) {
			k = x[i+1];
			x[i+1] = x[i];
			x[i] = k ;
		}
		if(x[i+2] > x[i]) {
			k = x[i+2];
			x[i+2] = x[i];
			x[i] = k ;
		}
		if(x[i+2] > x[i+1]) {
			k = x[i+2];
			x[i+2] = x[i+1];
			x[i+1] = k ;
		}
	}

	for(i=0;i< 3*n; i+=3){
				a = x[i] * x[i] ;
		b = (x[i+1] * x[i+1] ) + (x[i+2] * x[i+2]) ;

		if( a == b) cout << "YES" << endl ;
		if( a != b) cout << "NO" << endl ;

	}

    return 0;
}