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 <vector>
#include <algorithm>
#include <math.h>
using namespace std;

int main(){
	int N;
	int l1, l2, l3;
	int answer=0;
  vector<int> lines;
	vector<string> result;
	cin >> N;
	for(int i=0;i<N;i++){
		cin >> l1 >> l2 >> l3;
		lines.push_back(l1);
		lines.push_back(l2);
		lines.push_back(l3);
		while(next_permutation(lines.begin(), lines.end())){
			if(pow(lines[0],2) == pow(lines[1],2) + pow(lines[2],2)) answer = 1;
		}
		if (answer == 1) result.push_back("YES");
		else result.push_back("NO");
    lines.clear();
    answer = 0;
	}

  for(int i=0;i<result.size();i++){
    cout << result[i] << endl;
  }
	return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main()
{
	int n;
	cin >> n;
	for (int i = 0; i < n; i++)
	{
		int a, b, c;
		cin >> a >> b >> c;
		int max = a > b ? a : b;
		max = max > c ? max : c;
		cout << ((max*max == a * a + b * b + c * c - max * max) ? "YES" : "NO") << endl;
	}
}

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

int main(void)
{
    int n, a[3];
    scanf("%d", &n);
    for (int i = 0; i < n; ++i) {
        bool flag = false;
        scanf("%d %d %d", &a[0], &a[1], &a[2]);
        for (int j = 0; j < 3; ++j) {
            if (a[j] * a[j] == (a[(j + 1) % 3] * a[(j + 1) % 3] + a[(j + 2) % 3] * a[(j + 2) % 3])) {
                flag = true;
            }
        }
        if (flag) {
            printf("YES\n");
        } else {
            printf("NO\n");
        }
    }
    return 0;
}

C++: #include <stdio.h>

int tests, a, b, c;

int main(void)
{
  scanf("%d",&tests);
  while(tests--)
  {
    scanf("%d %d %d",&a,&b,&c);
    if (a*a == b*b + c*c || b*b == a*a + c*c || c*c == a*a + b*b)
      puts("YES");
    else
      puts("NO");
  }
  return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
int n,a,b,c,i;
cin>>n;
for(i=0;i<n;i++){
cin>>a>>b>>c;
if(a>=b+c && b>=a+c && c>=a+b)cout<<"YES"<<endl;else cout<<"NO"<<endl;
}
return 0;
}

C++: #include <iostream>
#include <stdio.h>
#define _USE_MATH_DEFINES
#include <cmath>
#include<algorithm>
using namespace std;
int main()
{
    int a,b,c,n,i;
    cin>>n;
    for(i=0;i<n;i++){
        cin>>a>>b>>c;
        if(a*a==b*b+c*c || b*b==a*a+c*c || c*c==b*b+a*a)
            cout<<"Yes"<<endl;
        else cout<<"No"<<endl;
        
    }
        
    return 0;
}

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

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

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

C++: //a, b, cツつェツ禿シツ療債つウツづェツつスツづつォツ、ツつサツづ個三ツ陛督づーツ篠敖づつ三ツ角ツ形ツつェツ陳シツ角ツ三ツ角ツ形YESツづーツ、ツつサツつ、ツづづ按つ「ツづ按づァNOツづーツ出ツ療債つケツづヲ
//ツ暗ェツ行ツ姪堋づ可表ツつウツづェツづゥnツ嘉アツ閉ェツ、ツデツーツタツセツッツトツづ債堕カツ催敖つキツづゥ

#include<iostream>
#include<algorithm>
using namespace std;

inline int Squere(int x)
{
	return x*x;
}

int main(void)
{
	const int N = 3;
	int a[N];
	int n;
	int i, j;

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

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

int main() {
	ios_base::sync_with_stdio( false );

	int n;
	cin >> n;

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

		a *= a;
		b *= b;
		c *= c;

		if( a+b == c || a+c == b || b+c == a ) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}
}

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

using namespace std;

void bubbleSort(vector<int> &a)
{
	int tmp;
	for (int i = 0; i < a.size() - 1; i++)
	{
		for (int j = 0; j < a.size() - 1 - i; j++)
		{
			if (a[j] < a[j + 1])
			{
				tmp = a[j + 1];
				a[j + 1] = a[j];
				a[j] = tmp;
			}
		}
	}
}

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

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

void judgement(int a,int b,int c) {
	if (a == b && b == c || a <= 0 || b <= 0 || c <= 0) {
		cout << "NO" << endl;
		return;
	}
	else if ((a*a) == (b*b) + (c*c) || (b*b) == (a*a) + (c*c) || (c*c) == (a*a) + (b*b)) {
		cout << "YES" << endl;
		return;
	}
	else {
		cout << "NO" << endl;
		return;
	}
}

int main() {
	unsigned int n;//dataset

	cin >> n;

	vector<int> vector_a;
	vector<int> vector_b;
	vector<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<iostream>
#include<algorithm>
using namespace std;
int main(){
  int n,j=0;
  int a[3];
  cin>>n;
  while(j!=n){
    for(int i=0;i<3;i++){
      cin>>a[i];
    }
    sort(a,a+3);
    if(a[2]*a[2]==a[1]*a[1]+a[0]*a[0]){
    cout<<"Yes"<<endl;
  }
  else{
    cout<<"No"<<endl;
  }
    j++;
  }
  return 0;
}

C++: 
inputArray = Array.new
rows = gets.to_i
i = 0
rows.times do
  temp = gets
  inputArray[i], inputArray[i+1], inputArray[i+2] = temp.split(" ").map(&:to_i)
  i += 3
end
i = 0
inputArray.map!{|n| n ** 2}
rows.times do
  if inputArray[i] + inputArray[i+1] == inputArray[i+2]
    puts "YES"
  else
    puts "NO"
  end
end

C++: #include<bits/stdc++.h>
using namespace std;
#define all(vec) vec.begin(),vec.end()
typedef long long int ll;
typedef pair<int,int> P;
typedef pair<P,P> PP;
const ll MOD=10000;
const ll INF=1000000000;
const int MAX=100001;
int dx[4]={0,1,0,-1};
int dy[4]={1,0,-1,0};
int main(){
    int a,b,c,n;
    cin>>n;
    while(n){
        int a2=a*a;int b2=b*b;int c2=c*c;
        if(a2==b2+c2||b2==a2+c2||c2==a2+b2){
            cout<<"YES"<<endl;
        }else{
            cout<<"NO"<<endl;
        }
        n--;
    }
    return 0;
}

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

using namespace std;

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