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 i,x;
	cin>>i;
	int a[10000],b[10000],c[10000];
	for(x=0;x<i;x++){
		cin>>a[x]>>b[x]>>c[x];
	}
	for(x=0;x<i;x++){
		if(((a[x]*a[x])+(b[x]*b[x]))==(c[x]*c[x]) || ((a[x]*a[x])+(c[x]*c[x]))==(b[x]*b[x]) || ((c[x]*c[x])+(b[x]*b[x]))==(a[x]*a[x])){
			cout<<"YES"<<endl;
		}else{ cout<<"NO"<<endl;}
	}
}

C++: //
//  main.cpp
//  b
//
//  Created by h3037178 on 2017/07/31.
//  Copyright ?? 2017??´ ?????£?????????. All rights reserved.
//

#include <iostream>
#include<algorithm>
#include<math.h>
using namespace std;
int main(){
    int n,a,i[3],f[3];
    cin>>n;
    for(int l=0;l<n;l++){
        for(a=0;a<3;a++){
            cin>>i[a];
            if(i[a]<=0){
                break;
            }
            f[a]=i[a]^2;
        }
        sort(f,f+3);
        if(f[2]==f[0]+f[1]){
            cout<<"Yes"<<endl;
        }else{
            cout<<"No"<<endl;
        }
    }
}

C++: #include<stdio.h>
int main(void)
{
	int n=0;
	int i=0;
	int a[1001]={0},b[1001]={0},c[1001]={0};
	int irekae=0;
	int irekae2=0;

	scanf("%d",&n);
	for (i=1;i<=n;i++)
	{
		scanf("%d",&a[i]);
		scanf("%d",&b[i]);
		if (a[i]>b[i])
		{
			irekae=a[i];
			a[i]=b[i];
			b[i]=irekae;
		}
		scanf("%d",&c[i]);
		if (a[i]>c[i])
		{
			irekae=a[i];
			irekae2=b[i];
			a[i]=c[i];
			b[i]=irekae;
			c[i]=irekae2;
		}
		if (a[i]%3==0&&b[i]%4==0&&c[i]%5==0)
		{
			printf("Yes\n");
		}
		else
		{
			printf("No\n");
		}
	}


	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;

int sq(int x){return x*x;}
int main(){
  int n;
  cin>>n;
  for(int i=0;i<n;i++){
    int a,b,c;
    cin>>a>>b>>c;
    cout<<(sq(max([a,b,c]))*2==sq(a)+sq(b)+sq(c) ? "YES" :"NO")<<endl;
  }
  return 0;
}

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

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

C++: #include <stdio.h>

int main(void)
{
	int x, y, z;
	scanf("%d %d %d", &x, &y, &z);
	if (x * x == y * y + z * z || y * y == x * x + z * z || z * z == x * x + y * y) {
		printf("YES\n");
	}else {
		printf("NO\n");
	}
	return 0;
}

C++: #include<iostream>

/*三平方の定理*/
int main() {
	int N,array[3];
	std::cin >> N;
	for (int i = 0; i < N; i++) {
		std:: cin >> array[0] >> array[1] >> array[2];
		for (int l = 0; l < 2; l++) {
			if (array[l] >= array[l + 1]) {
				int tmp;
				tmp = array[l];
				array[l] = array[l + 1];
				array[l + 1] = tmp;
			}
		}
		if (array[2] * array[2] == array[0] * array[0] + array[1] * array[1]) {
			std::cout << "YES" << std::endl;
		}
		else {
			std::cout << "NO" << std::endl;
		}
	}
}

C++: #include <stdio.h>
#include <math.h>
#include <queue>
#include <vector>
using namespace std;
 
int main()
{
    double a,b,c;
    int n,i;
    priority_queue< double, vector<double>, greater<double> > que;
 
    scanf("%d",&n);
 
    for(i = 0; i < n; i++){
        scanf("%lf %lf %lf",&a,&b,&c);
        que.push(a);
        que.push(b);
        que.push(c);
        a = que.top();
        que.pop();
        b = que.top();
        que.pop();
        if(pow( que.top(),2.0 ) == pow( a,2.0 ) + pow( b,2.0 )){
            printf("YES\n");
        }
        else{
            //printf("%lf %lf\n",pow( que.top(),2.0 ),pow( a,2.0 ) + pow( b,2.0 ));
            printf("NO\n");
        }
        que.pop();
    }
 
    return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
    int n,a,b,c,i,j;
    cin>>n;
    for(i=0;i<n;i++){
        cin>>a>>b>>c;
        if(a>1000||a<=0||b>1000||b<=0||c>1000||c<=0){
            break;
        }
        if(b*b+a*a-c*c==0){
            cout<<"Yes"<<endl;
        }
        else{
            cout<<"No"<<endl;
        }
    }
    return 0;
}