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 times;
	cin >> times;
	bool * a = new bool[times];
	for (int i = 0; i<times; ++i)
	{
		int q, w, e;
		cin >> q >> w >> e;
		if (q + w>e&&q + e>w&&e + w>q)
		{
			if (q*q + w * w == e * e || w * w + e * e == q * q || q * q + e * e == w * w)
				a[i] = true;
			else a[i] = false;
		}
		else
		{
			a[i] = false;
		}
	}
	for (int i = 0; i<times; ++i)
	{
		if (a[i])    cout << "YES" << endl;
		else    cout << "NO" << endl;
	}

}

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

class Triangle{
public:
Triangle(){
}
void push(int num1,int num2,int num3){
if(num1>=num2){
if(num1>=num3){c=num1;a=num2;b=num3;}
else{c=num3;a=num1;b=num2;}
}
else{
if(num2>=num3){c=num2;a=num1;b=num3;}
else{c=num3;a=num1;b=num2;}
}
};
void checkRight(){
int cs=c*c;
if(cs==a*a+b*b) ans=1;
else ans=0;
};

void print(){
if(ans==0)
cout << "NO" << endl;
if(ans==1)
cout << "YES" << endl;
}

protected:
int a,b,c,ans=5;
};

int main(){
int num,a,b,c;
	Triangle *tri /* = Triangle[1000]*/;
	cin >> num;
	tri = new Triangle[num]/*(a,b,c)*/;
	for(int n=0;n<num;n++){
	cin >> a;
	cin >> b;
	cin >> c;
	tri[n].push(a,b,c);
	}
for(int n=0;n<num;n++){
tri[n].checkRight();
tri[n].print();
}
return 0;
}

C++: #include<stdio.h>

void handan(int a, int b, int c)
{
	if (a*a == b*b + c*c)
		printf("YES\n");
	else
		printf("NO\n");
}
int main()
{
	int n;
	int a, b, c;

	scanf("%d", &n);
	for (int i = 0; i < n; i++)
	{
		scanf("%d %d %d", &a, &b, &c);
		if (a > b&&a > c)
			handan(a, b, c);
		else if (b > a&&b > c)
			handan(b, c, a);
		else
			handan(c, a, b);
	}
	return 0;
}

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

void judgement(unsigned int a, unsigned int b, unsigned int c) {
	if ((a ^ 2) == (b ^ 2) + (c ^ 2) || (b ^ 2) == (a ^ 2) + (c ^ 2) || (c ^ 2) == (a ^ 2) + (b ^ 2)) {
		cout << "YES" << endl;
	}
	else {
		cout << "NO" << endl;
	}
}

int main() {
	int n;//dataset

	cin >> n;

	vector<unsigned int> vector_a;
	vector<unsigned int> vector_b;
	vector<unsigned int> vector_c;

	for (int i = 0; i < n; i++)
	{
		int a, b, c;
		cin >> a >> b >> c;
		vector_a.push_back(a);
		vector_b.push_back(b);
		vector_c.push_back(c);
	}

	for (int i = 0; i < n; i++) {
		judgement(vector_a[i], vector_b[i], vector_c[i]);
	}

	return 0;

}

C++: #include<stdio.h>

int main(void)
{
	int x,n;
	int a[1000]={0},b[1000]={0},c[1000]={0},jud[1000]={0};

	scanf("%d",&x);
	
	for(n=0;n<x;n++)
	{
		scanf("%d %d %d",&a[n],&b[n],&c[n]);

		a[n]=a[n]*a[n];
		b[n]=b[n]*b[n];
		c[n]=c[n]*c[n];

		if(a[n]==(b[n]+c[n])||b[n]==(a[n]+c[n])||c[n]==(a[n]+b[n]))
		{
			jud[n]=1;
		}
		else
		{
			jud[n]=0;
		}
	}

	for(n=0;n<x;n++)
	{
		if(jud[n]==1)
		{
			printf("YES\n");
		}
		else if(jud[n]==0)
		{
			printf("NO\n");
		}
	}

	return 0;
}

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

int main(){
	int n;
	cin >> n;
	for(int i = 0; i < 3; i++){
		vector<int> vec;
		int a, b, c;
		cin >> a >> b >> c;
		vec.push_back(a);
		vec.push_back(b);
		vec.push_back(c);
		sort( vec.begin(), vec.end() );
		if(vec[0] + vec[1] >vec[2]){
			cout << "YES" << endl;
		}
		else{
			cout << "NO" << endl;
		}

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

using namespace std;

int main()
{
	vector<int> side(3);
	cin >> side[0] >> side[1] >> side[2];
	sort(side.begin(), side.end());
	if(side[0]*side[0] + side[1]*side[1] == side[2]*side[2])
		cout << "YES" << endl;
	else
		cout << "NO" << endl;
	return 0;
}

C++: #Include <iostream>
#include <vector>
#include <map>
#include <set>
#include <algorithm>
#include <numeric>
#include <cmath>
using namespace std;
typedef vector<int> VI;
#define REP( i, m, n ) for ( int i = (int)( m ); i < (int)( n ); ++i )

int main() {
    std::ios::sync_with_stdio(false);
    std::cin.tie(0);

    vector<vector<int>> triangles;
    
    int n;
    cin >> n;
    
    REP(i, 0, n) {
        vector<int> tmp;
        int a, b, c;
        cin >> a >> b >> c;
        tmp.push_back(a);
        tmp.push_back(b);
        tmp.push_back(c);
        
        sort(tmp.begin(), tmp.end());
        triangles.push_back(tmp);
    }

    for(auto sides : triangles) {
        if (sides[2] * sides[2] == sides[0]*sides[0]+sides[1]*sides[1]) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }
    
    return 0;
}

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


int main(){
    int x;
    vector<int> nums;
    nums.resize(3,0);
    cin >> x;
    while( 0 <= --x ){
        int a,b,c;
        cin >> nums[0] >> nums[1] >> nums[2];
        sort(nums.begin(), nums.end());
        if( pow(nums[0], 2) + pow(nums[1], 2) == pow(nums[2], 2)){
            cout << "YES" << endl;
        }else{
            cout << "NO" << endl;
        }
    }


    return 0;
}

C++: #include <iostream>
using namespace std;
      
      
int main()
{
      int a,b,c,n,index;
      
      index = 0; 
      cin >> n; 
      while(1)
      {
           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;
           
          if(index == n-1)
                   break;     
      
          index++;
     }
      
     return 0;
}

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

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

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

C++: #include<iostream>


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