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 <iostream>
using namespace std;

int main()
{
	int a,b,c,d,x;
	cin >> d;
	for (x = 1; x <= d; x++)
	{
		cin >> a>>b>>c;
		if (a < b + c&&b < a + c&&c < a + b&&a>b - c&&b>a - c&&c>a - b&&a>c-b&&b>c-a&&c>b-a)
				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<iostream>
#include<algorithm>
#include<vector>
#include<cmath>


using namespace std;

bool check(int a,int b,int c){
	if(a*a+b*b==c*c)return true;
	else false;
}

int main(){
	int n;
	cin>>n;
	for(int i=0;i<n;i++){
		int a,b,c;
		vector<int> hoge;
		cin>>a>>b>>c;

		
		cout<< ( ( check(a,b,c) || check(c,a,b) || check(b,c,a))==true ? "YES" : "NO")<<endl;
	}
	return 0;
}

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

int main(){
    float a[1000], b[1000], c[1000];
    int n, i;

    cin>>n;
    for(i=0; i<n; i++){
        cin>>a[i]>>b[i]>>c[i];
    }
    for(i=0; i<n; i++){
        if((b[i] + c[i]) / 2 == a[i] and a[i] != c[i]){
            cout<<endl<<"YES";}
        else{
            cout<<endl<<"NO";
        }
    }
    return 0;
}

C++: #include <iostream>
#include <stdio.h>
#include <vector>
#include <algorithm>

#define REP(i,n) for(int i = 0;i<(int)n;i++)
#define FOR(i,a,b) for(int i = (a);i < (b);i++)
#define RFOR(i,a,b) for(int i = (a);i>(b);i--)

using namespace std;

int main(void){
    
    int number;
    int hen[3];
    int temp;
    cin >> number;
    bool judge[1020];
    
    REP(i,number)
    {
        REP(i, 3)
        cin >> hen[i];
        REP(i, 2)
        REP(j, 2)
        {
            if(hen[j] < hen[j+1])
            {
                temp = hen[j+1];
                hen[j+1] = hen[j];
                hen[j] = temp;
            }
        }
        if(hen[0]*hen[0] == (hen[1]*hen[1] + hen[2]*hen[2]))
            judge[i] = true;
        else
            judge[i] = false;
        
    }
    REP(i, number)
    {
        if(judge[i])
            cout << "YES" << endl;
        else
            cout << "NO" << endl;
    }
  
    
    return 0;
}

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

#define REP(i, x) for (int i = 0; i < (int)(x); i++)
#define REPS(i, x) for (int i = 1; i <= (int)(x); i++)

int main(int argc, char *argv[])
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

    int n, a, b, c;
    cin >> n;

    vector<int> l(3);
    REP(i, n)
    {
        cin >> l[0] >> l[1] >> l[2];
        sort(l.begin(), l.end());
        cout << (l[0] * l[0] + l[1] * l[1] == l[2] * l[2] ? "YES" : "NO") << endl;
    }

    return 0;
}

C++: #include <iostream>
#include <cstdio>
#define NMAX (1000)
using namespace std;
int main(void){
    
    int N = 0;
    int a=0;
    int b=0;
    int c=0;
    char* Result[NMAX];

    //N??°?????\???
    scanf("%d",&N);
    
    //N?????°???????????????a,b,c???????????????
    for(int Ncount = 0; Ncount < N; Ncount++){
        scanf("%d %d %d",&a,&b,&c);
        
        if( (( (a^2) + (b^2) ) == (c^2)) || (( (b^2) + (c^2) ) == (a^2)) || (( (c^2) + (b^2) ) == (a^2))){
            Result[Ncount] = "YES";
        }else{
            Result[Ncount] = "NO";
        }
    }
    
    //??????????????????????????¨???Yes or No?????????
    for(int Ncount=0;Ncount < N;Ncount++){
        printf("%s\n",Result[Ncount]);
    }
    
}

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

main()
{
    int t;
    double a,b,c,res;

    scanf("%d",&t);

    while(t--)
    {
        scanf("%lf%lf%lf",&a,&b,&c);

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

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



int main(void)
{
  double a,b,c;
  int d;
  double Max,Min,ans;
  vector<int> array;
  int i=0;
  cin>>d;

  while(i<d)
    {
	cin>>a>>b>>c;
	 if(!cin)break;
	 Max=max(a,b);
	 Max=max(Max,c);
	 Min=min(a,b);
	 Min=min(Min,c);
     Max=pow(Max,2.0);
     Min=pow(Min,2.0);
    ans=sqrt((Max-Min));
    if(ans==a||ans==b||ans==c)array.push_back(0);	
    else array.push_back(1);
	i++;
    }
  i=0;
  while(i<array.size())
    {
	d=array[i];
	if(!d) cout<<"YES"<<endl;
	else cout<<"NO"<<endl;	
	i++;
    }
  array.clear();
}

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

using namespace std;

#define rep(i,n) for(int i = 0; i < n; i++)
#define REP(i,j,n) for(int i = j; i < n; i++)


int main(){

	int N;
	cin >> N;
	vector<double> data(N);

	rep(i,N){
		rep(j,3){
			cin >> data[j];
		}

		sort(data.begin(),data.end());

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

	}

	return 0;
}

C++: 
#include <iostream>

int main(int argc, const char * argv[]) {
    
    int n ;
    std::cin >> n ;
    
    for (int i=0; i<n; i++) {
        int a, b, c ;
        std::cin >> 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>
#include <cmath>
#include <algorithm>
using namespace std;

int main(){
  int num[3],c;
  cin >> c;
  for(int j=0; j<c;j++){
    for(int i=0; i<3;i++){
    cin >> num[i];
    }

  sort(num,num+3);
  if(pow(num[0],2)+pow(num[1],2)==pow(num[2],2))
    cout << "YES" <<endl;
  else
    cout <<"NO" << endl;
  }
}

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

int main()
{
    int a,b,c;
    int N;
    cin >> N;
    REP(i,N) {
        cin >> a >> b >> c;
        if (a*a+b*b=c*c) cout << "YES" << endl;
        else cout << "NO" << endl;
    }
    return 0;
}