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, 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;
}

C++: #include<iostream>

using namespace std;
int main(){
  int a,b,c,N;
    
  cin >> N;
  bool count[N];
  for(int i=0;i<N;i++){
    cin >> a >> b >> c;
    if(a*a==b*b+c*c || b*b==a*a+b*b || c*c==a*a+b*b){
      count[i]=true;}
  }
  for(int i=0;i<N;i++){
    if(count[i]==true){
      cout << "YES" << endl;}

    else if(count[i]==false){
      cout << "NO" << endl;}
  }
 
  return 0;
}

C++: #include <stdio.h>

int main(void)
{
	int l[3];
	int i;
	int n;
	
	scanf("%d", &n);
	while (n){
		for (i = 0; i < 3; i++){
			scanf("%d", &l[i]);
		}
		
		if (l[0] > l[2]){
			l[0] += l[2];
			l[2] = l[0] - l[2];
			l[0] -= l[2];
		}
		if (l[1] > l[2]){
			l[1] += l[2];
			l[2] = l[1] - l[2];
			l[1] -= l[2];
		}
		
		if (l[0] * l[0] + l[1] * l[1] == l[2] * l[2]){
			printf("YES\n");
		}
		else {
			printf("NO\n");
		}
		n--;
	}
	
	return (0);
}

C++: #include<iostream>

using namespace std;

int aa(int x, int y, int z) {

	return (((x ^ 2) + (y ^ 2) == (z ^ 2)) || ((x ^ 2) + (z ^ 2) == (y ^ 2)) || ((y ^ 2) + (z ^ 2) == (x ^ 2)));
}

int main() {

	int a, b[1000], c[1000], d[1000];
	bool e[1000];

	cin >> a;

	for (int i = 1; i <= a; i++)
	{
		cin >> b[i] >> c[i] >> d[i];

		e[i] = aa(b[i], c[i], d[i]);

	}

	for (int i = 1; i <= a; i++)
	{

		cout << ((e[i] != 0) ? "yes" : "no") << endl;
	}

	return 0;
}