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 a[100],b[100],c[100];
	int x=0;
	int n;

	while(true){
		cin >> n;

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

     		cin >> a[i] >> b[i] >> c[i];

	    	if(a[i]<b[i]){
		    	x=a[i];
			    a[i]=b[i];
		    	b[i]=x;
		    }
		    if(b[i]<c[i]){
		    	x=b[i];
	     		b[i]=c[i];
		    	c[i]=x;
		    }
		    if(a[i]<b[i]){
		    	x=a[i];
			    a[i]=b[i];
			    b[i]=x;
	    	}
		}
		for(int i=0 ;i<n ;i++){
		    a[i] = a[i]*a[i];
		    b[i] = b[i]*b[i];
		    c[i] = c[i]*c[i];

     		if(a[i]==b[i]+c[i])
	    		cout << "YES" << endl;
		    else
			    cout << "NO" << endl;
		}  
	        
	}
	
	return 0;
}

C++: #include<stdio.h>
#include<stdlib.h>
int main(void){
  int num,i=0;
  int* a;
  int* b;
  int* c;
 
  scanf("%d",&num);

  a=(int*)calloc(num,sizeof(int));
  b=(int*)calloc(num,sizeof(int));
  c=(int*)calloc(num,sizeof(int));


  while(num>i){
    scanf("%d %d %d",(a+i),(b+i),(c+i));
    i++;
    
  }

  for(i=0;num>i;i++){
   *a=*a**a;
   *b=*b**b;
   *c=*c**c;
   if(*a==*c+*b || *b==*a+*c || *c==*b+*a){
      printf("YES\n");
    }
    else{
      printf("NO\n");
    }
    a++;
    b++;
    c++;
  }
  return 0;
}

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

using namespace std;

/*-------------------------------*/
#define FOR(i, a, b) for(int i = (a); i < (b); i++)  //a~(b - 1)?????§
#define print(i) cout << i << endl //?°??????????Python?????????

typedef long long ll;
typedef vector<int> vi;
typedef vector<vector<int> > vii;
/*-------------------------------*/

int main(void)
{
  int a;
  int da[3];
  cin >> a;

  FOR(i, 0, a){
    cin >> da[0] >> da[1] >> da[2];
    sort(da, da + 3);
    if (da[0] * da[0] + da[1] * da[1] == da[2] * da[2]) print("YES");
    else print("NO");
  }

  return 0;
}

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

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

    
    return 0;
}

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

int main(void){

	int n;
	cin>>n;

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

	return 0;
}

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

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

int main() {
	int n;
	int a[3];
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> a[0] >> a[1] >> a[2];
		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 <cmath>
using namespace std;


int main(){

	int size;
	cin >> size;

	struct triangle{
		int elm[3];

		bool isRightTriangle(){
			for (int x = 0; x < 3; x++){
				for (int y = 0; y < 3; y++){
					for (int z = 0; z < 3; z++){
						if (x == z)continue;
						if (y == z)continue;
						if (elm[x] * elm[x] + elm[y] * elm[y] == elm[z] * elm[z])return true;
					}
				}
			}
			return false;
		}
	};

	triangle *ary = new triangle[size];

	for (int i = 0; i < size; i++){
		cin >> ary[i].elm[0] >> ary[i].elm[1] >> ary[i].elm[2];
	}

	for (int i = 0; i < size; i++){
		cout << (ary[i].isRightTriangle() ? "YES" : "NO") << endl;
	}

	delete[] ary;

	return 0;
}

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

int n;
int es[3];

int main() {
  scanf("%d", &n);
  for (int i=0; i<n; i++) {
    for (int j=0; j<3; j++) {
      scanf("%d", &es[j]);
    }

    sort(es, es+3);
    if (es[0]*es[0] + es[1]*es[1] == es[2]*es[2]) {
      puts("YES");
    } else {
      puts("NO");
    }
  }
}

C++: #include <iostream>

int main ()
{
    int N, x, y, z, X, Y, Z;
    std::cin >> N;
    for (int n = N; n > 0; --n) {
        std::cin >> x >> y >> z;
        X = x * x;
        Y = y * y;
        Z = z * z;
        if (X + Y = Z || Y + Z = X || Z + X = Y) {
            std::cout << "YES" << std::endl;
        } else {
            std::cout << "NO" << std::endl;
        }
    }
    return 0;
}

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


using namespace std;

string check(int a,int b,int c){
	int A=a*a,B=b*b,C=c*c;
	if(A+B==C || C+A==B || B+C==A)return "YES";
	else return "NO";
}


int main(){
	int n;
	cin>>n;
	for(int i=0;i<n;i++){
		int a,b,c;
		cin>>a>>b>>c;
		string ans=check(a,b,c);
		cout<<ans<<endl;
	}
	return 0;
}

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