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>
 
int print(void)
{
    if (C == A + B) {
        printf("YES\n");
    } else if (A == B + C) {
        printf("YES\n");
    } else if (B == C + A) {
        printf("YES\n");
    } else {
        printf("NO\n");
    }
}

int main(void)
{
    int i, N, a, b, c, A, B, C;
    scanf("%d", &N);
    for (i = 0; i < N; i++) {
    scanf("%d %d %d\n", &a, &b, &c);
    A = a * a;
    B = b * b;
    C = c * c;
    print();
    }
    return 0;
}

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

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

  cin >> N;
    
    if(N <= 0 || N > 1000)
        cout << "この数字ではダメです!!" << endl;
    else
        break;
    }
    
    string x[N];

while(N > 0 && cin >> a >> b >> c){
    
    
    while(1){
        if(a < 1 || a > 1000 || b < 1 || b > 1000 || c < 1 || c > 1000){
            cout << "数字を入力し直してください!!" << endl;
            break;
        }
        
        else{
    if(a+b>c && b+c>a && c+a>b){
        x[n]="YES";
    }
    else{
        x[n]="NO";
    }
            N--;
            n++;
            break;
        }
  }
}
    for(int i = 0;i < n;i++)
        cout << x[i] << endl;
    
  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>b&&a>c){
			if(a*a==b*b+c*c){
				printf("YES\n");
			}
			else{
				printf("NO\n");
			}
		}
		if(b>a&&b>c){
			if(b*b==a*a+c*c){
				printf("YES\n");
			}
			else{
				printf("NO\n");
			}
		}
		if(c>a&&c>b){
			if(c*c==a*a+b*b){
				printf("YES\n");
			}
			else{
				printf("NO\n");
			}
		}
		if(a==b&&b==c){
			printf("NO\n");
		}
	}
	return 0;
}

C++: #include<stdio.h>
int main()
{
    int a,b,c,T,i;
    scanf("%d",&T);
    for(i=1;i<=T;i++){

        scanf("%d%d%d",&a,&b,&c);
        if((c*c)==((a*a)+(b*b))||(a*a)==((c*c)-(b*b))||(b*b)==((c*c)-(a*a)))
        {
            printf("YES\n");
        }

        else printf("NO\n");
    }
    return 0;
}

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

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

C++: #include<iostream>

unsigned short a, b, c;
bool flag;

int main()
{
	while(std::cin>>a>>b>>c)
	{
		flag = false;
		if((a*a)+(b*b)==(c*c))
		{
			flag = true;
		}
		else if((a*a)+(c*c)==(b*b))
		{
			flag = true;
		}
		else if((b*b)+(c*c)==(a*a))
		{
			flag = true;
		}
		if(flag==false)
		{
			printf("NO\n");
		}
		else
		{
			printf("YES\n");
		}
	}
	return 0;
}

C++: // 2011/05/30 Tazoe

#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(b>a&&b>c){
			int tmp = a;
			a = b;
			b = tmp;
		}
		if(c>a&&c>b){
			int tmp = a;
			a = c;
			c = tmp;
		}

		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(void) {
	int max;
	cin >> max;
	
	int a[3];
	for(int i=0; i<max; 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; }
	}
	
	return 0;
}

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

using namespace std;

int main(){
	
	int N;
	vector<int> a(3);
	
	cin>>N;
	
	while(N>0){
		for(int i=0;i<3;i++)
			cin>>a[i];
		sort(a.begin(),a.end());
		if(pow(a[2],2.0)==pow(a[1],2.0)+pow(a[0],2.0))
			cout<<"Yes"<<endl;
		else
			cout<<"No"<<endl;
		N--;
	}
	
		
	}

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

int main()
{
    std::array<int,3> input;
    int N;
    for(std::cin >> N; N > 0; --N)
    {
        std::cin >> input[0] >> input[1] >> input[2];
        std::sort(begin(input),end(input));
        if(input[2] == hypot(input[1],input[0]))
        {
            std::cout << "YES" << std::endl;
        }
        else
        {
            std::cout << "NO" << std::endl;
        }
    }
    return 0;
}

C++: #include <stdio.h>

int main(int argc,char* argv[]){
  int num;
  int a,b,c;
  int count = 0;
  int ans;

  scanf("%d",&num);

  for(;count < num;++count){
    getchar();
    scanf("%d %d %d",&a,&b,&c);

    if(a > b && b > c){
      ans = (a*a == b*b + c*c) ? 1 : 0;
    }else if(b > c){
      ans = (b*b == a*a + c*c) ? 1 : 0;
    }else{
      ans = (a*a + b*b == c*c) ? 1 : 0;
    }

    printf("%s\n",ans ? "YES" : "NO");
  }

  return 0;
  
}

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<bits/stdc++.h>
using namespace std;

int main(){
    int n;
    cin >> n;
    for(int i=0;i<n;++i){
        int a[4] = {0};
        cin >> a[0] >> a[1] >> a[2];
        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>
#include<iostream>
using namespace std;
int main(){
  int N=0;
  int a[10000]={0},b[10000]={0},c[10000]={0};
  cin>>N;
  for(int i=0;i<N;i++){
	cin>>a[i]>>b[i]>>c[i];
  }
  for(int i=0;i<N;i++){
	if(a[i]*a[i]==b[i]*b[i]+c[i]*c[i]||b[i]*b[i]==c[i]*c[i]+a[i]*a[i]||c[i]*c[i]==a[i]*a[i]+b[i]*b[i]){
     	cout<<"YES"<<endl;
     }
    else{
    	cout<<"NO"<<endl;
    }
  }
  return 0;
}

C++: #include <iostream>

using namespace std;

void solve()
{
	int t;
	cin >> t;
	while(t--)
	{
		int Data[3];
		for(int i = 0; i < 3; ++i)
		{
			cin >> Data[i];
		}
		if((Data[0] * Data[0] + Data[1] * Data[1] == Data[2] * Data[2]) ||
			(Data[1] * Data[1] + Data[2] * Data[2] == Data[1] * Data[1]) || 
			(Data[0] * Data[0] + Data[2] * Data[2] == Data[1] * Data[1]))
		{
			cout << "YES" << endl;
		}
		else
		{
			cout << "NO" << endl;
		}
	}
}

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

}