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>

using namespace std;

int n;
int x[3];
bool ans;

int main(){
	cin >> n;
	while (n--){
		cin >> x[0] >> x[1] >> x[2];
		sort(x, x + 3);
		(x[0] * x[0] + x[1] * x[1] == x[2] * x[2]) ? cout << "YES\n" : cout << "NO\n";
	}
}

C++: #include<iostream>
#include<stdio.h>
#include<math.h>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
    vector<int> a;
    int n;
    cin>>n;
    while(n--){
        int t;
        for(int i=0;i<3;i++){
            cin>>t;
            a.push_back(t);
        }
        sort(a.begin(),a.end());
        if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2])
            cout<<"YES"<<endl;
        else
            cout<<"NO"<<endl;
        a.clear();
    }
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
int main(){
	static long long a,b[3]={0};
	cin>>a;
	for (int A=0;A<a;A++){
		cin>>b[0]>>b[1]>>b[2];
		sort(b,b+3);
		b[0]*=b[0];
		b[1]*=b[1];
		b[2]*=b[2];
		if (b[2]!=b[0]+b[1]) cout<<"No"<<endl;
		else cout<<"Yes"<<endl;
	}
	return 0;
}

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

using namespace std;

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

C++: #include <cstdio>

int main()
{
	int N, ia, ib, ic;
	int iTrueFlag[1000];

	scanf("%d",&N);

	for( int i=0;i<N;i++ ){
		scanf("%d %d %d",&ia, &ib, &ic);

		if( (ia*ia) + (ib*ib) == (ic*ic) )
			iTrueFlag[i] = 1;
		else
			iTrueFlag[i] = 0;
	}

	for( int i=0;i<N;i++ ){
		if( iTrueFlag[i] == 1)
			printf("YES\n");
		else
			printf("NO\n");
	}

	return 0;
}

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

class Triangle{
public:
	int roop, a, b, c;
	void get();
	int triangle(int, int, int);
};

void Triangle::get(){
	cin >> a >> b >> c;
}

int Triangle::triangle(const int, const int, const int){
	if ((a*a + b*b == c*c) || (a*a + c*c == b*b) || (b*b + c*c == a*a)){
		return (1);
	}
	else{
		return (2);
	}
}

int main(){
	Triangle TR;

	int i, *flag;
	cin >> TR.roop;
	flag = new int[TR.roop];
	for (i = 0; i < TR.roop; i++){
		TR.get();
		flag[i] = TR.triangle(TR.a, TR.b, TR.c);
	}
	for (i = 0; i < TR.roop; i++){
		if (flag[i] == 1){
			cout << "YES" << endl;
		}
		else{
			cout << "NO" << endl;
		}
	}

	return (0);
}

C++: #include <iostream>
#include <fstream>
#include <string>
#include <cmath>
#include <cstdlib>

int main(int argc, char *argv[]){
	//std::ifstream datafile(argv[1]); //input datafile
	std::string str;
	int num[3] = {}; //a, b, c
	int N; //N
	int tmp;

	// if(datafile.fail()){
	// 	std::cout << "error : can't open this file." << std::endl;
	// 	exit(1);
	// }

	//read N
	std::getline(std::cin, str);
	sscanf(str.c_str(), "%d", &N);

	if(N < 0 || N > 1000){
		std::cout << "error : out of constraints" << std::endl;
		exit(1);
	}

	//read dataset
	while(std::getline(std::cin, str)){
		sscanf(str.c_str(), "%d%d%d", &num[0], &num[1], &num[2]);

		for(size_t i = 0; i < 3; i++){
			if(num[i] < 1 || num[i] > 1000){
				std::cout << "error : out of constraints" << std::endl;
				exit(1);
			}
		}

		//bubble sort
		for(size_t i = 0; i < 2; i++){
			for(size_t j = 2; j > i; j--){
				if(num[j-1] > num[j]){
					tmp = num[j-1];
					num[j-1] = num[j];
					num[j] = tmp;
				}
			}
		}

		//Pythagorean theorem
		if(std::pow(num[2], 2) == std::pow(num[0], 2) + std::pow(num[1], 2)){
			std::cout << "YES" << std::endl;
		}else{
			std::cout << "NO" << std::endl;
		}
	}

	return 0;
}

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

int main(){
  int n;
  int a[3];
  cin >> n;

  for(int i=0;i<n;i++){
    for(int j=0;j<3;j++) cin >> a[j];
    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>
#include<string>
using namespace std;
int main(){
	int n,a,b,c;
	cin>>n;
	for(int i=0;i<n;i++){
		bool t=false;
		cin>>a>>b>>c;
		if(a*a+b*b==c*c)
			t=true;
		if(a*a+c*c==b*b)
			t=true;
		if(b*b+c*c==a*a)
			t=true;
		if(t==true)
			cout<<"YES"<<endl;
		else
			cout<<"NO"<<endl;
	}
	return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
int n;
cin >> n;
int a[3];
while(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>
int main(){

  int n,a,b,c,i,blank;

  scanf("%d",&n);

  for(i = 0; i < n; i++){

    scanf("%d %d %d",&a,&b,&c);

    if(a > b){

      blank=a;
      a=b;
      b=blank;

    }

    if(b > c){

      blank=b;
      b=c;
      c=blank;

    }

    if(a > b){

      blank=a;
      a=b;
      b=blank;

    }

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

  }

  return 0;

}

C++: #include <stdio.h>
#include <math.h>
int main(void) {
	int a, b, c, t, x, y, z;
	
	scanf("%d %d %d",&a,&b,&c);
	
	t = a ; x = b ; y = c; 
	if(t<=b){
		t = b ; x = c ; y = a ;
	}
	if(t<=c){
		t = c ; x = a ; y = b ;
	}
	t = pow(t,2) ;x = pow(x,2); y = pow(y,2); z = sqrt((x+y));

	if(t==z){
		printf("YES");
	}
	else{
		printf("NO");
	}
	return 0;
}

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

using namespace std;

int main(){
	int n,a,b,c;
	int m=0;
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		int a[3];
		for(int j=0;j<3;j++)scanf("%d",&a[j]);
		std::sort(a,a+3);
		
		int d = 20;
		if(a[0]>d || a[1]>d || a[2]>d)puts("hogehogehoge");
		
		if(a[0]*a[0]+a[1]*a[1] == a[2]*a[2]){
			puts("YES");
		}else{
			puts("NO");
		}
	}
}

C++: #include <iostream>

using namespace std;

int main()
{
	int n;
	int a, b, c;

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