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 <stdio.h>

#define MAX 1000000

int isPrime[MAX];

int main(){
    int num;
    int i, j;
    int count;
    
    // ??????????????????
    isPrime[0] = isPrime[1] = 0;
    for(i = 2; i < MAX; i++){
        isPrime[i] = 1;
    }
    
    // ??¨??????????????????????????????
    for(i = 2; i * i < MAX; i++){
        if(isPrime[i]){
            // i????????°????´???°?????????????????§????????°?????´
            for(j = 2 * i; j < MAX; j+=i){
                isPrime[j] = 0;
            }
        }
    }

    while(scanf("%d", &num) != EOF){
        count = 0;
        while(num){
            count += isPrime[num--];
        }
        printf("%d\n", count);
    }

    return 0;
}

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

bool isTriangle(int a, int b, int c);

int main(){
	int a, b, c, count;
	bool check;
	
	std::cin >> count;
	
	for(int i = 0; i < count; ++i){
		std::cin >> a >> b >> c;
		
		int max_num = std::max({a, b, c});
		if(max_num == a) check = isTriangle(b, c, a);
		else if(max_num == b) check = isTriangle(a, c, b);
		else if(max_num == c) check = isTriangle(a, b, c);
		
		if(check) std::cout << "YES" << std::endl;
		else std::cout << "NO" << std::endl;
	}
	
	return 0;
}

bool isTriangle(int a, int b, int c){
	if(std::pow(a, 2) + std::pow(b, 2) == std::pow(c, 2)) return true;
	else return false;
}

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

int main(){
    int total_num;
    cin >> total_num;
    int a,b,c;
    for (int i = 0; i< total_num;i++){
        cin >> a >> b >> c;
        int array[3] = {a,b,c};
        std::sort(array, array+3);
        if (pow(array[2], 2) == pow(array[0],2) + pow(array[1],2))
            cout << "YES" << endl;
        else
            cout << "NO" << endl;
    }

}

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

C++: #include<stdio.h>
int main(void){
  int max,min,a,b,c,d,e,f,i,j;
int n[9999];
j=0;
scanf(" %d", &i);
while(j<i){
scanf(" %d %d %d",&a,&b,&c);
d=a+b;
e=a+c;
f=b+c;
if(a>b){
  if(a>c)
    max=a;
  else max=c;}
 else if(b>c)
   max=b;
     else max=c;
if(d<e){
  if(d<f)
    min=d;
  else min=f;}
 else if(e<f)
   min=e;
     else min=f;
 if(max<min)
   n[j]=1;
 else 
   n[j]=0;
 j++; 
}
for(j=0;j<i;j++){
  if(n[j])
    printf("YES\n");
  else 
    printf("NO\n");
 }
return 0;
}

C++: //
// Created by tac on 2016/10/27.
//

#include <cstdlib>
#include <iostream>

namespace {

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

}


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

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

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

}

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

using namespace std;

    // always declare big array here it's safer for stack than inside of main

    bool isRight(int a , int b , int c){
        a = a * a;
        b = b * b;
        c = c * c;

        return a == b + c || b == a + c || c == a + b;
    }

int main(){

         // cin.sync_with_stdio(0); to speed input but scanf and printf faster
         // cin.tie(0);             not use scanf after that and not use endl but \n

         // element before me is (i - 1) * m + m - 1

		 ios_base::sync_with_stdio(false);
		 cin.tie(NULL);
		 cout.tie(NULL);

         int n;
         cin >> n;

         while(n--){
            int x , y , z;
            cin >> x >> y >> z;

            if(isRight(x , y , z))
                cout << "YES" << endl;
            else cout << "NO" << endl;
         }

    return 0;
}

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

int main(){
	using namespace std;
	int n;
	while(cin >> n&&n){
		long int a[3] = { 0 };
		cin >> a[0] >> a[1] >> a[2];
		sort(a,a+3);
		if((a[2]^2) == (a[0]^2)+(a[1]^2)) cout << "YES" << endl;
		else cout << "NO" << endl;
	}
	return 0;
}

C++: // includes
#include <cstdio>
#include <cstdint>
#include <iostream>
#include <iomanip>
#include <string>
#include <queue>
#include <stack>
#include <vector>
#include <set>
#include <map>
#include <unordered_map>
#include <algorithm>
#include <utility>
#include <functional>
#include <cmath>
#include <climits>
#include <bitset>

// macros
#define ll long long int
#define pb push_back
#define mk make_pair
#define pq priority_queue
#define FOR(i, a, b) for(int i=(a); i<(b);++i)
#define rep(i, n) FOR(i, 0, n)

using namespace std;

//  types
typedef pair<int, int> P;
typedef pair<ll, int> Pl;
typedef pair<ll, ll> Pll;
 
// constants
const int inf = 1e9;
const ll linf = 1LL << 50;
const double EPS = 1e-10;

// solve

int main(int argc, char const* argv[])
{
  int n;
  cin >> n;
  rep(i, n){
    ll a, b, c;
    cin >> a >> b >> c;
    ll mini = min(a, min(b, c));
    ll maxi = max(a, max(b, c));
    ll mid = a + b + c - mini - maxi;
    if(mini * mini + mid * mid == maxi * maxi)cout << "YES" << endl;
    else cout << "NO" << endl;
  }
	return 0;
}

C++: #include<iostream>

using namespace std;

//??\?????????
void swap(int *a, int *b){
	int temp = *a;
	*a = *b;
	*b = temp;
}

int main(){

	int num,i,j;
	
	cin >> num;
	
	int a[num],b[num],c[num];
	
	for(i=0;i<num;i++){
		cin >> a[i] >> b[i] >> c[i];
	}
	
	int t[3];
	for(i=0;i<num;i++){
		t[0] = a[i];
		t[1] = b[i];
		t[2] = c[i];
		
		int max,str;
		str = 1;
		while(str<=3){
			max = t[str-1];
			for(j=str;j<3;j++){
				if(max<t[j]){
					max = t[j];
					swap(t[str-1],t[j]);
				}
			}
			str++;
		}
		if(t[0]*t[0]==t[1]*t[1]+t[2]*t[2])
			cout << "YES\n";
		else cout << "NO\n";
	}
	
	return 0;
}

C++: #include <iostream>
using namespace std;
int main(int argc, char const *argv[])
{
    int n;
    cin>>n;
    while (n--)
        {
            int a,b,c;
            cin>>a>>b>>c;
            if (a*a + b*b =c*c)
            
                cout<<"YES";
                else 
                    cout<<"NO";
            
        }
    return 0;
}