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 <algorithm>
using namespace std;
int main()
{
	int test;
	cin >> test;
	while (test--)
	{
		int a, b, c;
		cin >> a >> b >> c;
		if (a > b) swap(a, b);
		if (b > c) swap(b, c);
		if (a+b > c) cout << "YES" << endl;
		else cout << "NO" << endl;
	}
	return 0;
}

C++: #include<stdio.h>
int main()
{
	int n,a,b,c;
	scanf("%d",&n);
	while(n--)
	{
		scanf("%d%d%d",&a,&b,&c);
		if(a*a+b*b==c*c || a*a+c*c==b*b || c*c+b*b==a*a)
			printf("YES\n");
		else
			printf("NO\n");
	}
	
}

C++: #include <cstdio>
int main(){
 int n,a,b,c,m;
 scanf("%d",&n);
 while(n>0){
  scanf("%d %d %d",&a,&b,&c);
  m=a>b?(a>c?a:c):(b>c?b:c);
  if (a*a+b*b+c*c==2*m*m){  printf("YES\n"); }
  else { printf("NO\n"); }
  --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 tri[3] = {0};
        cin>>tri[0]>>tri[1]>>tri[2];
        sort(tri, tri+3);
        if(tri[0]*tri[0] + tri[1]*tri[1] == tri[2]*tri[2]){
            cout<<"YES"<<endl;
        }else{
            cout<<"NO"<<endl;
        }
    }
    
    return 0;
}

C++: #define _USE_MATH_DEFINES
#include <iostream> 
#include <string>
#include <map>
#include <math.h>
#include <vector>
#include <algorithm>
using namespace std; 
int main(){
	int a, b, c;
	while(cin >> a >> b >> c){
		if(a+b <= c || a+c <= b || b+c <= a){
			cout << "NO" << endl;
		}
		else{
			cout << "YES" << endl;
		}
	}
	return 0;
}

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

int main()
{
	int a[3];
	while(cin >> a[0] >> a[1] >> a[2] && a[0] != EOF)
	{
		sort(a,a+3);
		if(a[0]*a[0] + a[1]*a[1] == a[2]*a[2])
			cout << "YES";
		else
			cout << "NO";
		cout << endl;
	}
	
}

C++: #include<iostream>
#include<math.h>
#include<algorithm>
using namespace std;
int main(){
    int n,a[1000],b,c,i[3],f[3],j,max,l,k,gou=0,gou2;
    float opi=4;
    cin>>n;
    for(l=0;l<n;l++){
        for(k=0;k<3;k++){
            cin>>i[k];
            if(i[k]>=1000||i[k]<=0){
                break;
            }
            f[k]=i[k]^2;
        }
        sort(f,f+3);
        if(f[2]==f[0]+f[1]){
            cout<<"YES"<<endl;
        }
        else{
            cout<<"NO"<<endl;
        }
    }
}

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

C++: //	??´?§?????§???¢ 
#include<iostream>
using namespace std;

int abs(int t) {
	if (t < 0) {
		t = t * -1;
	}
	return t;
}
int main() {
	int a,b,c;
	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;
			return 0;
		}
	}
	cout << "no" << endl;
}

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

int main(){
	int n;
	std::cin>>n;
	for(int i=0;i<n;i++){
		std::vector<int>v(3,0);		
		for(int j=0;j<3;j++)std::cin>>v[j];
		for(int j=0;j<3;j++){
			for(int k=0;k<2;k++){
				if(v[k]<v[k+1]){
					v[k]^=v[k+1];
					v[k+1]^=v[k];
					v[k]^=v[k+1];
				}
			}
		}
		if(v[0]*v[0]==v[1]*v[1]+v[2]*v[2])std::cout<<"YES"<<std::endl;
		else std::cout<<"NO"<<std::endl;
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
  int a, b, c, buf;
  int n;
  bool x[1000];
  cin >> n;
  for(int i = 0; i < n; i++){
    cin >> a >> b >> c;
    if(c > b){
      buf = c;
      c = b;
      b = buf;
    }
    if(b > a){
      buf = b;
      b = a;
      a = buf;
    }
    if(a*a==b*b+c*c)
      x[i] = 1;
    else
      x[i] = 0;
  }
  for(int i = 0; i < n; i++){
    if(x[i] == 0)
      cout << "NO\n";
    else
      cout << "YES\n";
  }
  return 0;
}

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==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>
#include <algorithm>
using namespace std;

bool isRTri(int a, int b, int c)
{
    return a * a + b * b == c * c;
}

int main()
{
    int n;
    cin >> n;
    for (int k = 1; k <= n; k++)
    {
        int a[3];
        cin >> a[0] >> a[1] >> a[2];
        sort(a, a + 3);
        bool r = isRTri(a[0], a[1], a[2]);
        cout << (r ? "YES" : "NO") << endl;
    }
    return 0;
}

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

namespace
{
	auto is_right = [](std::vector<unsigned int> length)
	{
		std::sort(length.begin(), length.end());
		std::transform(length.begin(), length.end(), length.begin(),
			[](unsigned int element) { return std::pow(element, 2); });
		return length[0] + length[1] == length[2];
	};
}

namespace
{
	unsigned int N; std::vector<unsigned int> length(3);
}

int main()
{
	std::scanf("%u", &N);
	for (unsigned int i = 0; i < N; i++)
	{
		std::scanf("%u%u%u", &length[0], &length[1], &length[2]);
		std::printf((is_right(length) ? "YES\n" : "NO\n"));
	}
	return 0;
}

C++: #include<stdio.h>
int main()
{
    long long int a,b,c;
    long long int n,i;
    scanf("%lld",&n);
    if(n<=1000){
    for(i=1;i<=n;i++){
        scanf("%lld %lld %lld",&a,&b,&c);
        if((a>=1&&a<=1000)&&(b>=1&&b<=1000)&&(c>=1&&c<=1000)){
        if((a*a)+(b*b)== (c*c) || (b*b)+(c*c)==(a*a) || (a*a)+(c*c)==(b*b)){
            printf("YES\n");
            }
        else{
            printf("NO\n");
    }
    }
    }
    }
    return 0;
}

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

C++: 
#include <iostream>
#include <stdlib.h>
using namespace std;
int cmp(const void *a,const void *b)
{
	return *(int*)a-*(int*)b;
}
int main()
{
	int N,i,a[3];
	cin>>N;
	for (i=0;i<N;i++)
	{
			cin>>a[0]>>a[1]>>a[2];
			qsort(a,3,sizeof(int),cmp);
			if (a[0]*a[0]+a[1]*a[1]==a[2]*a[2])
				//d[i]=1;
				cout<<"YES"<<endl;
			else
				cout<<"NO"<<endl;
				//d[i]=0;
			//i++;
	}
	return 0;
}