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 <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define shosu(n) setprecision(n)
using namespace std;
int main() {
  int A[3], N;
  cin >> N;
  for (int Q = 0; Q < N; Q++) {
    rep(i, 3) cin >> A[i];
    sort(A, A + 3);
    if (A[0] * A[0] + A[1] * A[1] - A[2] * A[2] == 0)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
}

C++: #include<iostream>
#include<cmath>
using namespace std;
int main(){
	int t,s=-1,j;
	cin>>t;
	while(t--){
		int a[3],x=0;
		for(int i=0;i<3;i++){
			cin>>a[i];
			if(s<a[i]) j=i;
			x+=a[i];
		}
	    x-=a[j];
	    if(x<a[j]) cout<<"NO"<<endl;
	    else{
	    	x=0;
	    	for(int i=0;i<3;i++){
	    	 a[i]=pow(a[i],2);
	    	 if(i!=j) x+=a[i];
	        }
	        if(a[j]==x) cout<<"YES"<<endl;
	        else cout<<"NO"<<endl;
		}
	}
	return 0;
}

C++: #include <stdio.h>
     
int triJudgefunc(int x, int y, int z);
     
int main(void)
{
    int row;
    scanf("%d", &row);
    for (int i = 0; i < row; ++i) {
        int firstn, secondn ,thirdn; 
        scanf("%d %d %d", &firstn, &secondn, &thirdn);
        if (triJudgefunc(firstn, secondn, thirdn) == 0) {
        printf("YES\n");
        } else {
        printf("NO\n");
        }
    }
    return 0;
}
     
     
     
int triJudgefunc(int x, int y, int z)
{
    int maxlength, notmax1, notmax2;
    if (x > y) {    //x > y
        if (x > z) {
            maxlength = x; notmax1 = y; notmax2 = z;    //x???max
        } else {
            notmax1 = x; notmax2 = y; maxlength = z;    //z???max
        }
    } else {    //y > x
        if (y > z) {
            notmax1 = x; maxlength = y; notmax2 = z;    //y???max
        } else {
            notmax1 = x; notmax2 = y; maxlength = z;    //z???max
        }
    }
    int result = maxlength * maxlength - notmax1 * notmax1 - notmax2 * notmax2;
    return result;
}

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

int main(){
	int a,b,c,d,i;
	cin>>i;
	for(int n=0;<i;n++){
 		cin>>a>>b>>c;
  		if(a<b){d=a,a=b,b=a;}
   		else if(a<c){d=a,a=c,c=d;}

   		if(a*a==b*b+c*c){cout<<"Yes"<<endl;}
   		else {cout<<"No"<<endl;}
   	}   
	return 0;
}

C++: #include <iostream>
#include <algorithm>
#define REP(i,n) for(int i=0;i<n;i++)
using namespace std;

int main() {
    int N;
    cin >> N;
    int a[3];
    REP(i,N){
        cin >> a[0] >> a[1] >> a[2];
        sort(a,a+3);
        if(a[0]*a[0]+a[1]*a[1] == a[2]*a[2])
            cout << "YES" << '\n';
        else
            cout << "NO" << '\n';
    }
        

}

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

using namespace std;

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

C++: #include <iostream>
#include <string>
#include <sstream>
using namespace std;
int main(){
    int a , b;
    while( cin >> a >> b ){
        stringstream ss;
        ss << a+b ;
        string str = ss.str();
        cout << str.size() << endl;
    }
}

C++: #include <iostream>

using namespace std;

int main() {

	int dataNum;
	int hen[1000][3];

	cin >> dataNum;
	for (int i = 0; i < dataNum; i++) {
		cin >> hen[i][0] >> hen[i][1] >> hen[i][2];
	}

	for (int i = 0; i < dataNum; i++) {
		//cout << "for i datanum=" <<dataNum << endl;
		//????????????????????§?????????
		for (int j = 3 - 1; j >0; j--) {
			//cout << "for j" << endl;
			for (int k = 0; k < j; k++) {
				//cout << hen[i][k] << "," << hen[i][k + 1] << endl;
				if (hen[i][k] > hen[i][k + 1]) {
					//cout << "swap" <<endl;
					int dummy = hen[i][k];
					hen[i][k] = hen[i][k + 1];
					hen[i][k + 1] = dummy;
				}
			}
		}

		//??´?§?????????§??????
		if (hen[i][0] * hen[i][0] + hen[i][1] * hen[i][1] == hen[i][2] * hen[i][2]) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO"  << endl;
		}
	}

	return 0;
}

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

int Max(int i[3]){
	int max=0,pos;
	for(int n=0;n<3;n++){
		if(max<i[n]){
			max=i[n];
			pos=n;
		}
	}
	return pos;

}

int main(){
	int N;
	cin >> N;
	while(N--){
		int i[3],c;
		int max;
		cin >> i[0] >> i[1] >> i[2];
		max = Max(i);
		c = i[max];
		i[max]=0;
		if(i[0]*i[0]+i[1]*i[1]+i[2]*i[2] == c*c)
			cout<<"YES\n";
		else
			cout<<"NO\n";
	}
}

C++: /*
AIZU ONLINE 0003

Is it a Right Triangle?
*/

#include <stdio.h>

main()
{
	int cnt;
	int a,b,c;
	int	i;

	scanf("%d",&cnt);
	for(i=0;i<cnt;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>
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){
            cout<<"YES"<<endl;
        }
        else if(a*a+c*c==b*b){
            cout<<"YES"<<endl;
        }
        else if(c*c+b*b==a*a){
            cout<<"YES"<<endl;
        }
        else{
            cout<<"NO"<<endl;
        }
    }
    
    return 0;
}

C++: #include <cstdio>
#include <algorithm>
#define LOOP(index,times) for(int index=0;index<times;index++)
using namespace std;

int main(){

int N;
scanf("%d",&N);

int l[3];

LOOP(i,N){

scanf("%d %d %d",&l[0],&l[1],&l[2]);
sort(l,l+3);

if(l[0]*l[0]+l[1]*l[1]==l[2]*l[2])
	printf("YES\n");
else
	printf("NO\n");		

}
return 0;		
}

C++: #include<iostream>
using namespace std;
int main()
{
  int a,b,c,n,t;
  cin >> n;
  for(i=0;i<n,i++)
   {
      cin >> a >> b >> c;
      if(a>b)
       {
          t = a;
          a = b;
          b = t;
       }
      if(a>c)
       {
          t = a;
          a = c;
          c = t;
       }
      if(b>c)
       {
          t = b;
          b = c;
          c = t;
       }
     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,b,c;scanf("%d",&n);while(n--){scanf("%d %d %d",&a,&b,&c);a*=a;b*=b;c*=c;printf("%s\n",a+b==c||b+c==a||c+a==b?"YES":"NO");}return 0;}

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

C++: #include<stdio.h>
int main(void){
	int i,N;
	scanf("%d",&N);
	for(i=0;i<N;i++){
		int j,a[3]={},b[3]={};
		for(j=0;j<3;j++){
			scanf("%d",&a[j]);
			}
		b[0]=a[0];
		if(a[0]<a[1]){
			b[1]=a[0];
			b[0]=a[1];
		}b[1]=a[1];
		if(b[0]<a[2]){
			b[2]=b[1];
			b[1]=b[0];
			b[0]=a[2];
		}else if(b[1]<a[2]&&a[2]<b[0]){
			b[2]=b[1];
			b[1]=a[2];
		}else b[2]=a[2];
		
		printf("%d %d %d",b[0],b[1],b[2]);
		if(b[0]*b[0]==b[1]*b[1]+b[2]*b[2])
			puts("YES");
		else puts("NO");
	}
	return 0;
}