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>
#include <algorithm>
#include <cmath>
using namespace std;

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

C++: #include<iostream>
using namespace std;
int main() {
	int x[3][1000];
	int a,b,c;
	cin >> b;
	for(a=0;a<b;a++) {
		for(c=0;c<3;c++) {
			cin >> x[c][a];
		}
	}
	for(a=0;a<b;a++){
		if(x[1][a]/3 == x[2][a]/4 && x[2][a]/4 == x[3][a]/5 || x[2][a]/5 == x[3][a]/4 || x[1][a]/4 == x[2][a]/3 && x[2][a]/3 == x[3][a]/5 || x[2][a]/5 == x[3][a]/3 || x[1][a]/5 == x[2][a]/3 && x[2][a]/3 == x[3][a]/4 || x[2][a]/4 == x[3][a]/3){
			cout << "YES" << endl;
		}
		else{
			cout << "NO" << endl;
		}
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
int f(int x){
    return x * x;
}

int main(void){
    int n, a, b, c, tmp;
    cin >> n;
    for(int i = 0; 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(f(c) == f(a) + f(b))
            cout << "YES" << endl;
        else
            cout << "NO" << endl;
    }
    return 0;
}

C++: #include<stdio.h>

int main()
{
    int a,b,c,i,n;
    scanf("%i",&n);
    for(i=1;i<=n;i++){
        scanf("%i%i%i",&a,&b,&c);
        if(c*c==a*a+b*b){
            printf("YES\n");
        }
        else{
            printf("NO\n");
        }
    }
    return 0;
}

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



int main(void){

	//??´?§?????§???¢??§????????????????????¶???a^2+b^2=c^2
	int N, a, b, c,L,M,S;

	cin >> N;

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

	
	}
	return 0;
}

C++: //include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <fstream>
#include <complex>
#include <math.h>
using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

//math
//-------------------------------------------
template<class T> inline T sqr(T x) {return x*x;}

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef pair<long, long> PLL;
typedef long long LL;
//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

//repetition
//------------------------------------------
#define FOR(i,a,b) for(long i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

//constant
//--------------------------------------------

//clear memory
#define CLR(a) memset((a), 0 ,sizeof(a))

const long double EPS = 1e-30;
const double INF = 1e12;

long double to_deg(long double r) {
    return r * 180.0 / (atan(1.0) * 4.0);
}
int main(){
	int a,b,c,T;
	cin>>T;
	REP(i,T){
		int a[3];
		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"<<endl;
		else cout<<"NO"<<endl;
	}
	return 0;
}

C++: 
#include<stdio.h>
#include<math.h>
int main()
{
    int n,i;
    int a[1000],b[1000],c[1000];
    scanf("%d",&n);
    for(i=0;i<n;i++){
        scanf("%d%d%d",&a[i],&b[i],&c[i]);
    }
    for(i=0;i<n;i++){
        if((c[i]*c[i])==(a[i]*a[i]+b[i]*b[i])||(a[i]*a[i])==(b[i]*b[i]+c[i]*c[i])||(b[i]*b[i])==(a[i]*a[i]+c[i]*c[i])){
            printf("YES\n");
        }else{
            printf("NO\n");
        }
    }
    return 0;
}

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

int main()
{
    int num;
    std::cin >> num; 
    int edge[3];

    for(int i = 0; i < num; i++) {

        std::cin >> edge[0] >> edge[1] >> edge[2];

        // "edge" to "edge+3" ha "array edge" no memory jyou no
        // adress no hajimari to owari wo simesu. 
        // Yoku miru to kou natteru ==> [hajimari, owari)
        std::sort(edge, edge + 3);

        if(edge[2] * edge[2] == edge[0] * edge[0] + edge[1] * edge[1]) {
            std::cout << "YES" << std::endl;
        } else {
            std::cout << "NO" << std::endl;
        }

    }
}

C++: using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CSharpPractice
{
	class Program
	{
		static bool IsRightTriangle(int a, int b, int c)
		{
			return a * a + b * b == c * c;
		}
		static void Main(string[] args)
		{
			int n = int.Parse(Console.ReadLine());
			for (int j = 0; j < n; j++)
			{
				List<int> list = new List<int>();
				foreach (string val in Console.ReadLine().Split(' '))
				{
					list.Add(int.Parse(val));
				}
				bool flg = false;
				for (int i = 0; i < 3; i++)
				{
					flg |= IsRightTriangle(list[i], list[(i + 1) % 3], list[(i + 2) % 3]);
				}
				Console.WriteLine(flg ? "YES" : "NO");
			}
		}
	}
}