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>
using namespace std;

int main () {
	int n;
	cin >> n;
	for (int i = 0; i < n; i++) {
		int a, b, c;
		cin >> a >> b >> c;
		a *= a;
		b *= b;
		c *= c;
		if (a + b == c || b + c == a || c + a == b) {
			cout << "YES" << endl;
		} else {
			cout << "NO" << endl;
		}
	}

	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;
        if(a+b>=c && a+c>=b && b+c>=a)
        {
            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;

        }


    }

    return 0;
}

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

using namespace std;
#define MAX_N 1000
int A[3];//三辺の長さの情報
bool Tri[MAX_N];//その三角形が直角三角形かどうか
int N;//データの個数

int main(){
  scanf("%d",&N);
  for(int j = 0;j < N;j++){
    for(int i = 0;i < 3;i++){
      cin >>A[i];
    }
    sort(A,A+N);
     Tri[j] = false;
    if(A[2]*A[2] == A[1]*A[1] + A[0]*A[0]&&A[0] !=0) {
      Tri[j] =true;
    }
  }
  for(int i =0;i < N;i++){
    if(Tri[i])
      cout <<"YES"<<endl;
    else
      cout <<"NO"<<endl;
  }
  return 0;
}

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

void Judgetriangle(int a, int b, int c);
void judge(int a, int b, int c);
int a, b, c;
bool flag = false;
int main(void)
{
    int n;
    scanf("%d", &n);
    for (int i = 0; i < n; ++i)
        {
            flag = false;
            scanf("%d %d %d", &a, &b, &c);
            Judgetriangle(a, b, c);
        }
    return 0;
}

void Judgetriangle(int a, int b, int c)
{
    judge (a, b, c);
    judge (a, c, b);
    judge (b, c, a);
    if (flag == true) {
        printf("YES\n");
    } else {
        printf("NO\n");
    }
}

void judge(int a, int b, int c)
{
    if (a * a + b * b == c * c) {
        flag = true;
    }
}

C++: #include <stdio.h>

int hantei(int l1,int l2,int l3);
//??´?§?????§???¢??????????????????????????????????????????

int main(void)
{
	int kaisuu, l1, l2, l3;
	scanf("%d", &kaisuu);
	for(int i = 0; i < kaisuu; i++) {
		scanf("%d %d %d", &l1, &l2, &l3);
		if(hantei(l1, l2, l3) == 1) {
			printf("YES\n");
		}else{
			printf("NO\n");
		}
	}
	return 0;
}

int hantei(int l1,int l2,int l3)
{
	int llong, lshort1, lshort2;
	if(l1 <= l2) {
		lshort1 = l1 ^ 2;
		if(l2 <= l3) {
			lshort2 = l2 ^ 2;
			llong = l3 ^ 2;
		}else{
			lshort2 = l3 ^ 2;
			llong = l2 ^ 2;
		}
	}else{
		lshort1 = l2 ^ 2;
		if(l1 <= l3) {
			lshort2 = l1 ^ 2;
			llong = l3 ^ 2;
		}else{
			lshort2 = l3 ^ 2;
			llong = l1 ^ 2;
		}
	}
	if(lshort1+ lshort2 == llong) {
		return 1;
	}else{
		return 0;
	}
}

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

int main()
{
priority_queue<int> que;
int n;
cin>>n;
fot(int i=0;i<n;i++)
{
int a,b,c;
for(int j=0;j<3;j++)
{
cin>>a;
que.push(a);
}
a=que.top();
que.pop();
b=que.top()
que.pop();
c=que.top()
que.pop();
if(a-b<c)
cout<<"YES"<<endl;
else
cout<<"NO"<<endl;
}
return 0;
}

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

int main(){
    
    int num,a,b,c;
    cin >> num;
    
    for(int ii=0;ii<num;ii++){
        cin >> a >> b >> c;
        
        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 n;
    int a, b, c;

    cin >> n;

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

      cin >> a >> b >> c;

      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 <bits/stdc++.h>
using namespace std;
//#include <boost/multiprecision/cpp_int.hpp>
//using multiInt = boost::multiprecision::cpp_int;

using ll = long long int;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
template<typename Q_temp>
using smaller_queue = priority_queue <Q_temp, vector<Q_temp>, greater<Q_temp> >;

const int INF = (int) 1e9;
const ll LINF = (ll) 4e18;
const ll MOD = (ll) (1e9 + 7);
const double PI = acos(-1.0);
const int limit = 100010;

#define REP(i,m,n) for(ll i = m; i < (ll)(n); ++i)
#define rep(i,n) REP(i, 0, n)
#define MP make_pair
#define MT make_tuple
#define YES(n) cout << ((n) ? "YES" : "NO") << endl
#define Yes(n) cout << ((n) ? "Yes" : "No") << endl
#define Possible(n) cout << ((n) ? "Possible" : "Impossible") << endl
#define all(v) v.begin(), v.end()
#define NP(v) next_permutation(all(v))
#define dbg(x_) cerr << #x_ << ":" << x_ << endl;
#define dbg2(x_) for(auto a_ : x_) cerr << a_ << " "; cerr << endl;
#define dbg3(x_ , sx_) rep(i, sx_) cerr << x_[i] << " "; cerr << endl;
vector<int> Dx = {0, 0, -1, 1, -1, 1, -1, 1, 0};
vector<int> Dy = {1, -1, 0, 0, -1, -1, 1, 1, 0};

inline ll CEIL(ll a, ll b) {
    return (a + b - 1) / b;
}

//------------------------------------------------------

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

    int n;
    cin >> n;
    
    auto check = [](int x, int y, int z) {
        return x * x + y * y == z*z;
    };

    rep(i, n) {
        int a, b, c;
        cin >> a >> b >> c;
        YES(check(a, b, c) || check(b, c, a) || check(c, a, b));
    }
    return 0;
}

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

int main(){
    int n,a,b,c,max;
    bool output[1000]={false};

    std::cin >> n;
    for (int i=0;i<n;++i)
    {
        std::cin >> a >> b >> c;
        if (a>b && a>c){
            max = a;
            a = 0;
        }
        else if (b>a && b>c){
            max= b;
            b = 0;
        }
        else if (c>a && c>b){
            max= c;
            c = 0;
        }
        if (pow(max,2) == pow(a,2)+pow(b,2)+pow(c,2)){
            output[i] = true;
        }
    }
    for (int i=0;i<n;++i){
        if (output[i]) std::cout << "YES" << std::endl;
        else std::cout << "NO" << std::endl;
    }
}

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

int main(){
	int t[1000][3], cnttri=0, cntlen, i;
	string str, tmp;
while(getline(cin, str)){
	cntlen=0;
	istringstream stream(str);
	while(getline(stream, tmp, ' ')){
		if(cntlen > 2){cntlen++;break;};
		t[cnttri][cntlen] = atoi(tmp.c_str());
		cntlen++;
		
	}
	if(cntlen == 3){
		cnttri++;
	}
}
	for(i=0;i<cnttri;i++){
		if(t[i][2]*t[i][2] == t[i][1]*t[i][1] + t[i][0]*t[i][0]){
			cout << "YES\n";
		}else{
			cout << "NO\n";
		}
	}
	return 0;
}

C++: #include <iostream>

using namespace std;



int main() {

    int N;

    cin >> N;

    int a, b, c;

    for (int n = 0; n != N; ++n) {

        cin >> a >> b >> c;

        a*a + b*b == c*c ? cout << "YES" << endl : cout << "NO" << endl;

    }

    return 0;

}