Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

func main() {
	n, err := strconv.Atoi(strScan())
	if err != nil {
		fmt.Println("数字を入力して下さい。")
	} else {
		var counter int = n
		var judgeArr []string
		scanner := bufio.NewScanner(os.Stdin)
		for scanner.Scan() {
			strArr := strings.Fields(scanner.Text())
			castNumArr := StringToInt(strArr)
			judgeArr = append(judgeArr, checkTriangle(castNumArr))
			counter--
			if counter == 0 {
				break
			}
		}
		for _, v := range judgeArr {
			fmt.Println(v)
		}
	}
}

func checkTriangle(i []int) string {
	if checkSt(i[0], i[1], i[2]) || checkSt(i[1], i[2], i[0]) || checkSt(i[2], i[0], i[1]) {
		return "YES"
	} else {
		return "NO"
	}
}

func Sq(x int) int {
	return x * x
}

func checkSt(a, b, c int) bool {
	return (Sq(a) + Sq(b)) == Sq(c)
}

func StringToInt(s []string) []int {
	var i []int
	for _, v := range s {
		castNum, err := strconv.Atoi(v)
		if err != nil {
			panic(err)
		}
		i = append(i, castNum)
	}
	return i
}

func strScan() (stringInput string) {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	stringInput = scanner.Text()
	return
}

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

C++: #define _USE_MATH_DEFINES
#include <cmath>

#include <iostream>
#include <string>

using namespace std;

int main()
{
	int n;
	int a,b,c;
	
	cin >> n;
	
	while (n)
	{
		cin >> a >> b >> c;
		
		if (pow(c, 2) == pow(a, 2) + pow(b, 2))
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
		
		n--;
	}
	return 0;
}

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

int main(int argc, char *argv[]){
    int N,a,b,c;
	cin >> N;
	for (int i = 0; i < N; ++i){
		cin >> a >> b >> c;
		cout << (((a*a+b*b==c*c) || ((a*a+c*c==b*b) || (c*c+b*b==a*a))) ? "YES":"NO") << endl;
	}
    return 0;
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
int main() {
    int n, e[3];
    cin >> n;
    for (int i=0; i<n; ++i) {
        cin >> e[0] >> e[1] >> e[2];
        sort(e, e+3);
        if (e[2] * e[2] == e[0] * e[0] + e[1] * e[1]) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }
    return 0;
}

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

C++: #include <iostream>
#include <algorithm>
using namespace std;
int main() {
    int N; cin >> N;
    for (int i=0; i<N; ++i) {
        int l[3];
        cin >> l[0] >> l[1] >> l[2];
        
        sort(l, l+3);
        
        if (l[0]*l[0] + l[1]*l[1] == l[2]*l[2]) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }
    return 0;
}

C++: /*
AOJ_0003_IsitaRightTriangle?

EOFはWindowsはCtrl+Z,UNIXはCtrl+D

方針
配列入れて昇順ソートして　１番目と２番目の二乗の合計が
三番目の二乗になってるか確かめる。

配列の大きさが３固定なので、multisetに格納するのはもったいない
普通の配列に入れて、sortを使う

*/

#include <iostream>
#include <string>
#include <cstdio>
#include <math.h>
#include <algorithm>

using namespace std;

int main() {
	int N, side[3], i,j;

	cin >> N;

	for (i = 0; i < 3; i++){
		cin >> side[0] >> side[1] >> side[2];
		sort(side, side + 3);

		if (pow(side[0], 2) + pow(side[1], 2) == pow(side[2], 2)){
			cout << "YES" << endl;		
		}
		else {
			cout << "NO" << endl;
		}	
	}
	return 0;
}

C++: #include <stdio.h>
#include <string.h>

typedef struct{
    int m[3];
}triangle;

int main( void ){

    triangle *tri;
    int e;
    scanf( "%d",&e );
    if(( tri = ( triangle * ) malloc( sizeof( triangle ) * e )) == NULL ) return -1;
    for( int i = 0;i < e;i++ )scanf( "%d %d %d",
                                        &tri[i].m[0],&tri[i].m[1],&tri[i].m[2] );

    for( int i = 0;i < e;i++ ){
        for( int k = 0;k < 2;k++ ){
            for( int j = 0;j < 2;j++ ){
                if( tri[i].m[j] => tri[i].m[j+1] ){
                    int buf = tri[i].m[j];
                    tri[i].m[j] = tri[i].m[j+1];
                    tri[i].m[j+1] = buf;
                }
            }
        }
        if( tri[i].m[0] * tri[i].m[0] + tri[i].m[1] * tri[i].m[1] == tri[i].m[2] * tri[i].m[2] ) printf( "YES\n" );   
        else printf( "NO\n" );
    }
    return 0;
}

C++: #include <iostream>

using namespace std;
int loop;
int panjang[1000][1000];
int y = 0;
int temp = 0;
int main()
{
 cin >> loop;
for(int x=0;x<loop;x++)
{
        cin >> panjang[x][y] >> panjang[x][y+1] >> panjang[x][y+2];

}
for(int looper= 0;looper<loop;looper++)
{
    for(int looper2 = 0;looper2<4;looper2++)
{
    if((panjang[looper][y+1])<(panjang[looper][y+2]))
    {
        temp = panjang[looper][y+1];
        panjang[looper][y+1]=panjang[looper][y+2];
        panjang[looper][y+2]=temp;
        temp = 0;
            if((panjang[looper][y])<(panjang[looper][y+1]))
    {
        temp = panjang[looper][y];
        panjang[looper][y]=panjang[looper][y+1];
        panjang[looper][y+1]=temp;
        temp = 0;
    }
    }

}

for(int pyth=0;pyth<loop;pyth++)
{
    if(panjang[pyth][y]*panjang[pyth][y]==panjang[pyth][y+1]*panjang[pyth][y+1]+panjang[pyth][y+2]*panjang[pyth][y+2])
        cout << "YES" << endl;
    else cout << "NO" << endl;
}


}

}

C++: #include<stdio.h>

void right_triangle(int x, int y, int z)
{
    int xx = x * x;
    int yy = y * y;
    int zz = z * z;
    if (xx == yy + zz) {
        printf("YES\n");
    } else if (yy == xx + zz) {
        printf("YES\n");
    } else if (zz == xx + yy) {
        printf("YES\n");
    } else {
        printf("NO\n");
    }
}    

int main(void)
{
    int n;
    scanf("%d", &n);
    for (int i = 0; i < n; i++) {
        int r[3];
        scanf("%d %d %d", &r[0], &r[1], &r[2]);
        right_triangle(r[0], r[1], r[2]);
    }
    return 0;
}

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

#define Triangle(s1,s2,s3) if(s1*s1+s2*s2==s3*s3)
using namespace std;

int main()
{
	int n;
	int h[3];
	vector<int> side;
	int i;
	
	cin >> n;
	
	for(i=0;i<n;i++)
	{
		side.clear();
		
		for(int j=0;j<3;j++)
		{
			cin >> h[j];
			side.push_back(h[j]);
		}
		
		sort(side.begin(),side.end());
		
		Triangle(side[0],side[1],side[2])
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}
}