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++: 

/* vo00_03.cpp */
#include <iostream>
#include <cmath>
#include <queue>
using namespace std;

int main()
{
	const char *y = "YES";
	const char *n = "NO";

	priority_queue<int> que;

	int N;
	int s;

	double s1, s2, s3;

	cin >> N;

	for (; N; --N) {

		for (int i = 0; i < 3; ++i) {
			cin >> s;
			que.push(s);
		}

		s1 = que.top(); que.pop();
		s2 = que.top(); que.pop();
		s3 = que.top(); que.pop();

		if (pow(s1, 2) == pow(s2, 2) + pow(s3, 2)) cout << y << '\n';
		else cout << n << '\n';


		while (!que.empty()) que.pop();	//	キューを空にする
	}

	return 0;
}

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

#define REP(i,n) for(int i = 0;i<(int)n;i++)
#define FOR(i,a,b) for(int i = (a);i < (b);i++)
#define RFOR(i,a,b) for(int i = (a);i>(b);i--)

using namespace std;

int main(void){
    
    int number;
    int hen[3];
    int temp;
    cin >> number;
    bool judge[200];
    
    REP(i,number)
    {
        REP(i, 3)
        cin >> hen[i];
        REP(i, 2)
        REP(j, 2)
        {
            if(hen[j] < hen[j+1])
            {
                temp = hen[j+1];
                hen[j+1] = hen[j];
                hen[j] = temp;
            }
        }
        if(hen[0]*hen[0] == (hen[1]*hen[1] + hen[2]*hen[2]))
            judge[i] = true;
        else
            judge[i] = false;
        
    }
    REP(i, number)
    {
        if(judge[i])
            cout << "YES" << endl;
        else
            cout << "NO" << endl;
    }
  
    
    return 0;
}

C++: #include<bits/stdc++.h>
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++;
  }
}

C++: #include<bits/stdc++.h>
#include<vector>
#include<list>
#include<stack>
#include<queue>
#include<algorithm>
using namespace std;


int main(){
    int n;
    scanf("%d", &n);
    for(int i=0;i<n;i++){
        vector<int> t(3);
        for(auto&e:t){
            scanf("%d",&e);
        }
        sort(t.begin(),t.end());
        if(t[0]*t[0]+t[1]*t[1]==t[2]*t[2]){
            printf("YES\n");
        }else{
            printf("NO\n");
        }
    }
    return 0;
}

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

int main() {

    int N;
    cin >> N;

    int a, b, c;

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

        vector<int> vec;

        vec.push_back(a);
        vec.push_back(b);
        vec.push_back(c);

        sort(vec.begin(), vec.end(), greater<int>());

        if(pow(vec[0], 2) == pow(vec[1], 2) + pow(vec[2], 2)) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }

    return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
  int N,a,b,c;
  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<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[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 n;
	cin>>n;
	for(int i=0;i<n;i++){
		int a,b,c;
		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;
	}
	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 <iostream>
using namespace std;

int main()
{
	int side1[1000], side2[1000], side3[1000], N;
	cin >> N;
	for (int i = 0; i < N; ++i) {
		cin >> side1[i] >> side2[i] >> side3[i];
	}
	for (int i = 0; i < N; ++i) {
		int a = side1[i] * side1[i], b = side2[i] * side2[i], c = side3[i] * side3[i];
		if (a + b == c || a + c == b || b + c == a)cout << "YES" << endl;
		else cout << "NO" << endl;
	}

	return 0;
}

C++: #include <stdio.h>
#include <algorithm>
using namespace std;
int main(){
	int N;
	int count=0;
	int a[3];
	scanf("%d ",&N);
	while(count!=N){
	for(int i=0;i<3;i++){
		scanf("%d ",a[i]);
	}
	sort(a,a+3);
	if(a[2]<(a[0]+a[1])){
		printf("YES");
		count++;
	}
	else{
		printf("NO");
		count++;
	}
	}
	return 0;
	}

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

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

C++: #include<cstdio>
int main(){
	int n;
	int a,b,c;
	scanf("%d",&n);
	for(int i=1;i<=n;i++){
		scanf("%d %d %d",&a,&b,&c);
		int max;
		char max_c;
		if(a>b) {max_c = 'a';}
		else {max_c = 'b';}
		if(c > max) {max_c = 'c';}
		
		if(max_c == 'a'){
			if(a*a == b*b + c*c) printf("YES\n");
			else printf("NO\n");
		}
		else if(max_c == 'b'){
			if(b*b == c*c + a*a) printf("YES\n");
			else printf("NO\n");
		}
		else{
			if(c*c == a*a + b*b) printf("YES\n");
			else printf("NO\n");
		}
	}
	return 0;
}

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

C++: #include<stdio.h>
#include<iostream>
#include<cmath>
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 || b*b == a*a + c*c || c*c == a*a + b*b) {
			printf("YES\n");
		}else printf("NO\n");
	}

	return 0;