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>
#include <string>
#include <vector>
#include <map>
#include <sstream>
#include <functional>
#include <numeric>
#include <cmath>
#include <cstring>
#include <queue>
#include <stack>
#include <set>

using namespace std;

#define ALL(co) co.begin(), co.end()

typedef long long LL;
typedef pair<int, int> P;
typedef pair<P, P> PP;
typedef vector<int> Array;
typedef vector<int> LArray;

const int INF = 1 << 29;
const LL LINF = 1LL << 60;

int itiv;
inline int getInt() { return (cin >> itiv, itiv); }
void readAll(Array& vec, int n) { for (int i = 0; i < n; i++) cin >> vec[i]; }
inline bool between(int first, int last, int n) { return first <= n && n <= last; }
inline bool inRange(int begin, int end, int n) { return begin <= n && n < end; }
inline bool inRange(int size, int n) { return 0 <= n && n < size; }

int m, n;
int dx[] = { -1, 0, 1, 0 }, dy[] = { 0, -1, 0, 1 };
int dr[] = { 0, -1, 0, 1 }, dc[] = { -1, 0, 1, 0 };


int main(void)
{
	while(cin >> n && n)
	{
		for (int i = 0; i < n; i++)
		{
			Array arr(3);
			readAll(arr, n);
			sort(ALL(arr));
			cout << (arr[2] * arr[2] == arr[0] * arr[0] + arr[1] * arr[1] ? "YES" : "NO") << endl;
		}
	}
	return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<functional>
#include<vector>
#include<math.h>
#define L(_i,_N) for(int _i=0;_i<_N;_i++)
typedef long long int lli;
using namespace std;

int main() {
	int N,Line[3];
	cin >> N;
	L(i, N) {
		L(j, 3) cin >> Line[j];
		sort(Line, Line + 3);
		if (pow(Line[0], 2) + pow(Line[1], 2) == pow(Line[2], 2)) cout << "Yes" << endl;
		else cout << "No" << endl;
	}
	return 0;
}

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

int main(void)
{
	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 || a * a + c * c == b * b || b * b + c * c == a * a){
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		}
	}
}

C++: #include <iostream>

int main()
{
    int n;
    std::cin >> n;

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

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

C++: #include<stdio.h>

void right_triangle(int x, int y, int z);

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

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

C++: #include<iostream>
using namespace std;
int main(void){
    int a{},b{},c{},n{};
    cin>>n;
    for(int i=0;i<n;i++){
        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))))
            cout<<"YES"<<endl;
        else
            cout<<"NO"<<endl;
    }
    return 0;
}

C++: #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];
    sort(a,a+3);//a[0]<=a[1]<=a[2]
    if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2]){
      cout<<"YES"<<endl;
    }else{
      cout<<"NO"<<endl;
    }
  }
}

C++: 
#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(a*a==b*b+c*c)
            cout<<"YES"<<endl;
        else if(b*b==a*a+c*c)
            cout<<"YES"<<endl;
        else if(c*c==a*a+b*b)
            cout<<"YES"<<endl;
        else
            cout<<"NO"<<endl;
    }
    return 0;
}

C++: #include<stdio.h>
int main()
{
	int a, b, c, d, c2;
	a = 0;
	b = 0;
	c = 0;
	d = 0;
	c2 = 0;
	while(scanf("%d %d %d", &a, &b, &c)(
	{
		d = a * a + b * b;
		c2 = c * c; 
		if( d == c2 )
		{
			printf("YES");
		}
		else
		{
			printf("NO");
		}
	}
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <algorithm>
#include <sstream>
#include <cmath>
#include <set>
#include <cstdio>

using namespace std;

#define REP(i,n) for(int (i)=0;(i)<(int)(n);(i)++)
#define RREP(i,n) for(int (i)=(int)(n)-1;(i)>=0;(i)--)
#define REMOVE(Itr,n) (Itr).erase(remove((Itr).begin(),(Itr).end(),n),(Itr).end())
#define PB_VEC(Itr1,Itr2) (Itr1).insert((Itr1).end(),(Itr2).begin(),(Itr2).end())
#define UNIQUE(Itr) sort((Itr).begin(),(Itr).end()); (Itr).erase(unique((Itr).begin(),(Itr).end()),(Itr).end())

typedef long long ll;

int main(){
    
    int N;
    cin>>N;
    
    REP(i,N){
        int a,b,c;
        cin>>a>>b>>c;
        if(a+b<c)cout<<"NO"<<endl;
        else if(a+c<b)cout<<"NO"<<endl;
        else if(b+c<a)cout<<"NO"<<endl;
        else cout<<"YES"<<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++){
		for(int j = 0; j < 3;j++){
		cin >> a[j] ;
	}

	sort(a, a+3);
	if(a[2]*a[2] == a[0]*a[0] + a[1]*a[1]) cout << "YES" << endl;
	else cout << "NO" << endl;


	}
	
	return 0;
}

C++: #include<iostream>
#include<math.h>
#include<algorithm>
using namespace std;
int main(){
    int n,a[3],b[3],l,k;
    cin>>n;
    for(l=0;l<n;l++){
        if(l>1000){
            break;
        }
        for(k=0;k<3;k++){
            cin>>a[k];
            if(a[k]>1000||a[k]<=0){
                break;
            }
            b[k]=a[k]^2;
        }
        sort(b,b+3);
        if(b[2]==b[0]+b[1]){
            cout<<"YES"<<endl;
        }
        else{
            cout<<"NO"<<endl;
        }
    }
    return 0;
}

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

using namespace std;

#define str to_string
#define rep(i, n) for (int i=0; i<int(n); i++)
#define all(c) (c).begin(), (c).end()

int N;

int main() {
  cin >> N;
  rep(i, N) {
    int t[3];
    rep(i, 3) cin >> t[i];
    sort(t, t+3);
    int a = t[0], b = t[1], c = t[2];
    if (a*a + b*b == c*c) cout << "YES" << "\n";
    else                  cout << "NO"  << "\n";
  }
  return 0;
}