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 <stdio.h>

void right_triangle(int x, int y, int z)
{
    if ((x * x + y * y == z * z) || (x * x + z * z == y * y) || (y * y + z * z == x * x)) {
        printf("YES\n");
    } else {
        printf("NO\n");
    }
}

int main(void)
{
    int n, x, y, z;
    scanf("%d", &n);
    for (int i = 0; i < n; ++i) {
        scanf("%x %y %z", &x, &y, &z);
        right_triangle(x, y, z);
    }
    return 0;
}

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

using namespace std;

int main()
{
    double a,b,c;
    int n,i;
    priority_queue<double, vector<double>, greater<double>> que;
    cin >> n;
    for(i = 0; i < n; i++)
    {
        cin >> a >> b >> c;
        que.push(a);
        que.push(b);
        que.push(c);
        a = que.top();
        que.pop();
        b = que.top();
        que.pop();
        if(pow(que.top(), 2.0) == pow(a, 2.0) + pow(b, 2.0))
           cout << "YES" << endl;
        else
            cout << "NO" << endl;
        que.pop();
    }

    return 0;
}

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

using namespace std;

/*-------------------------------*/
#define FOR(i, a, b) for(int i = (a); i < (b); i++)  //a~(b - 1)?????§
#define print(i) cout << i << endl //?°??????????Python?????????

typedef long long ll;
typedef vector<int> vi;
typedef vector<vector<int> > vii;
/*-------------------------------*/

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

  FOR(i, 0, a){
    cin >> da[0] >> da[1] >> da[2];
    sort(da, da + 3);
    if (da[0] * da[0] + da[1] * da[1] == da[2] * da[2]) print("Yes");
    else print("No");
  }

  return 0;
}

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

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

C++: #include <stdio.h>

int main(void)
{
	int h[3][1000], n, i, temp;
	scanf("%d", &i);
	for (n = 0; n < i; n++){
		scanf("%d %d %d", &h[0][n], &h[1][n], &h[2][n]);
		if (h[0][n]<=h[1][n]){
			temp=h[0][n];
			h[0][n]=h[1][n];
			h[1][n]=temp;
		}
		if(h[0][n]<=h[2][n]){
			temp=h[0][n];
			h[0][n]=h[2][n];
			h[2][n]=temp;
		}
/*	}
	for (n = 0; n < i; n++){
*/		if ((h[0][n]*h[0][n])==(h[1][n]*h[1][n]+h[2][n]*h[2][n])){
			printf("YES\n");
		} else printf("NO\n");
	}
	return 0;
}

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

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef complex<double> P;
typedef pair<int,int> pii;
#define REP(i,n) for(ll i=0;i<n;++i)
#define REPR(i,n) for(ll i=1;i<n;++i)
#define FOR(i,a,b) for(ll i=a;i<b;++i)

#define DEBUG(x) cout<<#x<<": "<<x<<endl
#define DEBUG_VEC(v) cout<<#v<<":";REP(i,v.size())cout<<" "<<v[i];cout<<endl
#define ALL(a) (a).begin(),(a).end()

#define MOD (ll)(1e9+7)
#define ADD(a,b) a=((a)+(b))%MOD
#define FIX(a) ((a)%MOD+MOD)%MOD

int main(){
  int n;
  while(n--){
    int a,b,c;
    cin>>a>>b>>c;
    if(a>b)swap(a,b);
    if(b>c)swap(b,c);
    if(a*a+b*b==c*c){
      cout<<"YES"<<endl;
    }else{
      cout<<"NO"<<endl;
    }
  }
  return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
	int a[3];
	int n;
	cin>>n;
	for(int i=0;i<n;i++){
		cin>>a[0]>>a[1]>>a[2];
		sort(a,a+3);
		if(a[0]+a[1]>a[2]){cout<<"YES"<<endl;}
		else{cout<<"NO"<<endl;}
	}
}

C++: #include<stdio.h>

int main(){
	
	int a,b,c,N,t,A,B,C;
	
	scanf("%d",&N);
	
	for(t=0;t<N;t++){
		
		scanf("%d %d %d",&a,&b,&c);
		
		A=a*a-b*b-c*c;
		B=b*b-c*c-b*b;
		C=c*c-a*a-b*b;
		
		if(A==0||B==0||C==0){
			
			printf("YES\n");
		}
		else printf("NO\n");
		
	}
	
	return 0;
	
}

C++: #include <stdio.h>

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

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

using namespace std;

int main()
{
	int L[3], E[1000], N;
	
	cin >> N;

	for (int i = 0; i < N; i++)
	{
		cin >> L[0] >> L[1] >> L[2];

		if (L[0] < L[1]){ swap(L[0], L[1]); }
		if (L[0] < L[2]){ swap(L[0], L[2]); }
		if (L[1] < L[2]){ swap(L[1], L[2]); }

		E[i] = L[0] * L[0] - (L[1] * L[1] + L[2] * L[2]);
	}

	for (int i = 0; i < N; i++)
	{
		cout << ((E[i] == 0) ? "YES" : "NO") << endl;
	}

	return 0;
}

C++: #include <iostream>
#include <stdio.h>
#include <vector>
#include <algorithm>
#include <math.h>

int main() {
    int n;
    std::vector<int> V;
    
    scanf("%d", &n);
    for (int i = 0; i < n; i++) {
        int a, b, c; std::cin >> a >> b >> c;
        V.push_back(a); V.push_back(b); V.push_back(c);
        std::sort(V.begin(), V.end());
        if (pow(V[2], 2) == pow(V[0], 2) + pow(V[1], 2)) printf("YES\n");
        else printf("NO\n");
    }
    
    return 0;
}

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

#define upper 1000
#define lower 1
#define eN 1000

using namespace std;


void swap(int& e1, int& e2, int& e3){
	if (e1 > e2){
		int tmp = e1;
		e1 = e2;
		e2 = tmp;
	}
	if (e2 > e3){
		int tmp = e2;
		e2 = e3;
		e3 = tmp;
	}
	if (e1 > e3){
		int tmp = e1;
		e1 = e3;
		e3 = tmp;
	}
}

bool check(int e1, int e2, int e3){
	if (((e1*e1)+(e2*e2)) == (e3*e3)){
		return true;
	}
	else{
		false;
	}
}

int main(void){
	int N = 1;
	cin >> N;
	vector<bool> arr;

	for (int i=0; i<N; ++i){
		int e1, e2, e3;
		cin >> e1 >> e2 >> e3;
		swap(e1,e2,e3);
		arr.push_back(check(e1,e2,e3));
	}
	for (int i=0; i<N; ++i){
		if (arr[i] == true){
			cout << "YES" << endl;
		}
		else{
			cout << "NO" << endl;
		}
	}
	return 0;
}

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

int main(){
	int N = 0;
	int array[3] = {};
	int i, j, k;
	int work;
	cin >> N;
	for(i = 0; i < N; i++){
		cin >> array[0] >> array[1] >> array[2];


		for (j = 0; j < 3 - 1; j++) {
			for (k = 3 - 1; k > j; k--) {
				if (array[k - 1] > array[k]) {
					work = array[k];
					array[k] = array[k - 1];
					array[k - 1]= work;
				}
			}
		}	
			
		if( (array[0] + array[1]) > array[2] ){
				cout << "YES\n";
				
		}
		
		else{
			cout << "NO\n";
		}
    }
    return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int i=0;i<n;i++)

int main() {
  int n;cin>>n;
  rep(i,n) {
    vector<int> a(3);
    cin>>a[0]>>a[1]>>a[2];
    sort(a.begin(),a.end());
    cout<<(a[2]*a[2]==a[1]*a[1]+a[0]*a[0] ? "YES":"NO")<<endl;
  }
  return 0;
}