Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

func main() {
	n, _ := strconv.Atoi(strScan())
	scanner := bufio.NewScanner(os.Stdin)
	for i := 0; i < n; i++ {
		scanner.Scan()
		strArr := strings.Fields(scanner.Text())
		castNumArr := StringToInt(strArr)
		fmt.Println(checkTriangle(castNumArr))
	}
}

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

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


int main(){

	int size;
	cin >> size;

	struct triangle{
		int elm[3];

		bool isRightTriangle(){
			for (int x = 0; x < 3; x++){
				for (int y = 0; y < 3; y++){
					for (int z = 0; z < 3; z++){
						if (x == z)continue;
						if (y == z)continue;
						if (elm[x] * elm[x] + elm[y] * elm[y] == elm[z] * elm[z])return true;
					}
				}
			}
			return false;
		}
	};

	triangle *ary = new triangle[size];

	for (int i = 0; i < size; i++){
		cin >> ary[i].elm[0] >> ary[i].elm[1] >> ary[i].elm[2];
	}

	for (int i = 0; i < size; i++){
		cout << (ary[i].isRightTriangle() ? "YES" : "NO") << endl;
	}

	delete[] ary;

	return 0;
}

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

int n;
int es[3];

int main() {
  scanf("%d", &n);
  for (int i=0; i<n; i++) {
    for (int j=0; j<3; j++) {
      scanf("%d", &es[j]);
    }

    sort(es, es+3);
    if (es[0]*es[0] + es[1]*es[1] == es[2]*es[2]) {
      puts("YES");
    } else {
      puts("NO");
    }
  }
}

C++: #include <iostream>

int main ()
{
    int N, x, y, z, X, Y, Z;
    std::cin >> N;
    for (int n = N; n > 0; --n) {
        std::cin >> x >> y >> z;
        X = x * x;
        Y = y * y;
        Z = z * z;
        if (X + Y = Z || Y + Z = X || Z + X = Y) {
            std::cout << "YES" << std::endl;
        } else {
            std::cout << "NO" << std::endl;
        }
    }
    return 0;
}

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


using namespace std;

string check(int a,int b,int c){
	int A=a*a,B=b*b,C=c*c;
	if(A+B==C || C+A==B || B+C==A)return "YES";
	else return "NO";
}


int main(){
	int n;
	cin>>n;
	for(int i=0;i<n;i++){
		int a,b,c;
		cin>>a>>b>>c;
		string ans=check(a,b,c);
		cout<<ans<<endl;
	}
	return 0;
}

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

//直角三角形の判定
bool Get_triangle(int a,int b,int c){
    if(pow(a,2)+pow(b,2) == pow(c,2))
        return true;
    else
        return false;
}

//与えられたデータに対しての直角三角形の判定
string Judge_triangle(int a,int b,int c){
    if(Get_triangle(a,b,c) || Get_triangle(b,c,a) ||Get_triangle(c,a,b)){
        return "YES";
    }
    else{
        return "NO";
    }
}

//与えられたデータが条件に合うかの判定
bool Judge_line(int x){
    if(1<=x || x<=1000 || ceil(x) == floor(x))
        return true;
    else
        return false;
}

//main
int main(){
  int N;
  int a,b,c;
  int n=0;
    
    while(1){

  cin >> N;
    
        if(N > 1000 || ceil(N) != floor(N)){
            
        }
    else
        break;
    }
    
    string x[N];

while(N > 0 && cin >> a >> b >> c){
    
    
    while(1){
        if(Judge_line(a) && Judge_line(b) && Judge_line(c)){
            x[n] = Judge_triangle(a,b,c);
            N--;
            n++;
            break;
        }
        
        else{
            break;
        }
  }
}
    
    //結果の表示
    for(int i = 0;i < n;i++)
        cout << x[i] << endl;
    
  return 0;
}

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

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

C++: #include <iostream>
using namespace std;
int main(){
    int a,x,y,z;
    cin >> a;
    for (int i=0;i<a;i++){
        cin >> x >> y >> z;
        if (x^2+y^2!=z^2 && x^2+z^2!=y^2 && y^2+z^2!=x^2)
            cout << "NO" << endl;
        else
            cout << "YES" << endl;
    }
}

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

int main(){
	int n, a[3], max;
	cin >> n;
	for (int i = 0; i < n; i++){
		cin >> a[0] >> a[1] >> a[2];
		if (a[0] >= a[1]){
			if (a[0] >= a[2]){
				max = 0;
			}
			else max = 2;
		}
		else {
			if (a[1] >= a[2]){
				max = 1;
			}
			else max = 2;
		}
		switch (max){
		case 0:
			if (((double)a[max] * a[max] / (a[1] * a[1] + a[2] * a[2])) == 1) max = 1;
			else max = 0;
			break;
		case 1:
			if (((double)a[max] * a[max] / (a[0] * a[0] + a[2] * a[2])) == 1) max = 1;
			else max = 0;
			break;
		case 2:
			if (((double)a[max] * a[max] / (a[1] * a[1] + a[0] * a[0])) == 1) max = 1;
			else max = 0;
			break;
		}
		if (max == 1){
			cout << "YES" << '\n';
		}
		else cout << "NO" << '\n';
	}
	return 0;
}

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

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

C++: #include<stido.h>
int main(void)
{
	int a,b,c1,c2,c3,i;
	scanf("%d",&a);
	for(i=0;i<a;i++){
		scanf("%d %d %d",&c1,&c2,&c3);
	}
	if(c1*c1+c2*c2==c3*c3){
		printf("YES\n");
	}
	else if(c1*c1+c3*c3==c2*c2){
		printf("YES\n");
	}
	else if(c2*c2+c3*c3==c1*c1){
		printf("YES\n");
	}
	else{
		printf("NO\n");
	}
	return 0;
}

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

int a, b, c;

int check(){
	if(a*a+b*b == c*c || a*a+c*c == b*b || b*b+c*c == a*a)
		return 1;
	return 0;
}

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

C++: #include <bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<ll> VL;
typedef vector<VL> VVL;
typedef pair<int, int> PII;

#define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(x) x.begin(), x.end()
#define MOD 1000000007
#define INF (1LL<<25)     //33554432
#define PI 3.14159265359
#define EPS 1e-12
//#define int ll

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

  return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <algorithm>
using namespace std;
 
int main()
{
  int T;
  scanf("%d",&T);
  for(int t=0;t<T;t++){
    int edge[3];
    scanf("%d %d %d",edge,edge+1,edge+2);
    sort(edge,edge+3,greater<int>());
    if(edge[0]*edge[0]==edge[1]*edge[1]+edge[2]*edge[2]){
      printf("%s\n","YES");
    }else{
      printf("%s\n","NO");
    }
  }
 
  return 0;
}