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>
#include <string>
#include <cmath>
using namespace std;

//直角三角形の判定
bool Get_triangle(int a,int b,int c){
    if(pow(a,2)+pow(b,2) == pow(c,2))
        return true;
    else
        return false;
}

//与えられたデータに対しての直角三角形の判定
string Judge_triangle(int a,int b,int c){
    if(Get_triangle(a,b,c) || Get_triangle(b,c,a) ||Get_triangle(c,a,b)){
        return "YES";
    }
    else{
        return "NO";
    }
}

//与えられたデータが条件に合うかの判定
bool Judge_line(int x){
    if(1<=x || x<=1000 || ceil(x) == floor(x))
        return true;
    else
        return false;
}

//main
int main(){
  int N;
  int a,b,c;
  int n=0;
    
    while(1){

  cin >> N;
    
        if(N > 1000 || ceil(N) != floor(N)){
            
        }
    else
        break;
    }
    
    string x[N];

while(N > 0 && cin >> a >> b >> c){
    
    
    while(1){
        if(Judge_line(a) && Judge_line(b) && Judge_line(c)){
            x[n] = Judge_triangle(a,b,c);
            N--;
            n++;
            break;
        }
        
        else{
            break;
        }
  }
}
    
    //結果の表示
    for(int i = 0;i < n;i++)
        cout << x[i] << endl;
    
  return 0;
}

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

int main()
{
    int n;cin>>n;
    for(int i=0;i<n;++i){
        int num[3];
        for(int j=0;j<3;++j)cin>>num[j];
        sort(num,num+3);
        if(pow(num[2],2)==pow(num[0],2)+pow(num[1],2))
            cout<<"YES"<<endl;
        else cout<<"NO"<<endl;
    }
    return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
    int a,x,y,z;
    cin >> a;
    for (int i=0;i<a;i++){
        cin >> x >> y >> z;
        if (x^2+y^2!=z^2 && x^2+z^2!=y^2 && y^2+z^2!=x^2)
            cout << "NO" << endl;
        else
            cout << "YES" << endl;
    }
}

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

int main(){
	int n, a[3], max;
	cin >> n;
	for (int i = 0; i < n; i++){
		cin >> a[0] >> a[1] >> a[2];
		if (a[0] >= a[1]){
			if (a[0] >= a[2]){
				max = 0;
			}
			else max = 2;
		}
		else {
			if (a[1] >= a[2]){
				max = 1;
			}
			else max = 2;
		}
		switch (max){
		case 0:
			if (((double)a[max] * a[max] / (a[1] * a[1] + a[2] * a[2])) == 1) max = 1;
			else max = 0;
			break;
		case 1:
			if (((double)a[max] * a[max] / (a[0] * a[0] + a[2] * a[2])) == 1) max = 1;
			else max = 0;
			break;
		case 2:
			if (((double)a[max] * a[max] / (a[1] * a[1] + a[0] * a[0])) == 1) max = 1;
			else max = 0;
			break;
		}
		if (max == 1){
			cout << "YES" << '\n';
		}
		else cout << "NO" << '\n';
	}
	return 0;
}

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

int main(){
	int n;
	cin >> n;
	for(int i = 0; i < n; i++){
		int l[3];
		cin >> l[0] >> l[1] >> l[2];
		sort(l,l+3);
		if(l[0]*l[0] + l[1]*l[1] == l[2]*l[2])
			cout << "Yes" << endl;
		else
			cout << "No" << endl;
	}
}

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

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

int a, b, c;

int check(){
	if(a*a+b*b == c*c || a*a+c*c == b*b || b*b+c*c == a*a)
		return 1;
	return 0;
}

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

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

using namespace std;
typedef long long ll;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<ll> VL;
typedef vector<VL> VVL;
typedef pair<int, int> PII;

#define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(x) x.begin(), x.end()
#define MOD 1000000007
#define INF (1LL<<25)     //33554432
#define PI 3.14159265359
#define EPS 1e-12
//#define int ll

int a[1010];
signed main(void)
{
  int n;
  cin >> n;
  REP(i, n) {
    int a[3];
    REP(j, 3) cin >> a[j];
    sort(a, a+3);
    if(a[2]*a[2] == a[1]*a[1] + a[0]*a[0]) cout << "YES" << endl;
    else cout << "NO" << endl;
  }

  return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <algorithm>
using namespace std;
 
int main()
{
  int T;
  scanf("%d",&T);
  for(int t=0;t<T;t++){
    int edge[3];
    scanf("%d %d %d",edge,edge+1,edge+2);
    sort(edge,edge+3,greater<int>());
    if(edge[0]*edge[0]==edge[1]*edge[1]+edge[2]*edge[2]){
      printf("%s\n","YES");
    }else{
      printf("%s\n","NO");
    }
  }
 
  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
typedef long long ll;
// Welcome to my source code!

int main() {
    int n;
    int edge[3];
    cin >> n;
    while (n--) {
        cin >> edge[0] >> edge[1] >> edge[2];
        sort(edge, edge+3);
        int t = pow(edge[0], 2) + pow(edge[1], 2);
        double x = sqrt(t);
        if (x == edge[2]) cout << "YES" << endl;
        else cout << "NO" << endl;
    }
}

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

#define upper 1000
#define lower 1
#define eN 1000

using namespace std;

bool check(int e1, int e2, int e3){
	if (((e1*e1)+(e2*e2)) == (e3*e3)){
		return true;
	}
	else{
		false;
	}
}

int main(void){
	int N;
	cin >> N;

	vector<bool> result;

	for (int i=0; i<N; ++i){
		if (N == eN){
			break;
		}
		int e1, e2, e3;
		vector<int> len;
		cin >> e1 >> e2 >> e3;
		len.push_back(e1);
		len.push_back(e2);
		len.push_back(e3);
		sort(len.begin(), len.end());
		result.push_back(check(len[0],len[1],len[2]));
	}
	for (int i=0; i<N; ++i){
		if (result[i] == true){
			cout << "YES" << endl;
		}
		else{
			cout << "NO" << endl;
		}
	}
	return 0;
}

C++: #include <stdio.h>

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

int main(void)
{
    int n, x, y, z;
    scanf("%d", &n);
    for (int i = 0; i < n; ++i) {
        scanf("%x %y %z", &x, &y, &z);
        right_triangle(x, y, z);
    }
    return 0;
}

C++: #include <cstdio>

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

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

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

    return 0;
}

C++: #include<iostream>

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

	return 0;
}

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

int main() {
	int n,d[3];
	cin>>n;
	for(int i=0; i<n; i++){
		cin>>d[0]>>d[1]>>d[2];
		sort(d,d+3);
		if(d[0]*d[0]+d[1]*d[1] == d[2]*d[2]){
			cout<<"YES"<<endl;
		}else{
			cout<<"NO"<<endl;
		}
	}
	return 0;
}