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<stdio.h>
#include<math.h>
int main(void)
{
	int n,i,w[1000],a[1000],s[1000],d[1000],x[1000];
	while(scanf("%d",&n)!=EOF){
		for(i=0;i<n;i++){
			scanf("%d %d %d",&a[i],&s[i],&d[i]);
			w[i]=(a[i]*a[i])+(s[i]*s[i]);
			x[i]=d[i]*d[i];
		}
		for(i=0;i<n;i++){
			if(w[i]==x[i]){
				printf("YES\n");
			}
			else{
				printf("NO\n");
			}
		}	
	}
	return 0;
}

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

string Judge_triangle(int a,int b,int c){
    if(a+b>c && b+c>a && c+a>b){
        return "YES";
    }
    else{
        return "NO";
    }
}

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){
            
            break;
        }
        
        else{
            x[N-1] = Judge_triangle(a,b,c);
            N--;
            n++;
            break;
        }
  }
}
    for(int i = 0;i < n;i++)
        cout << x[i] << endl;
    
  return 0;
}

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

		else
			cout<<"NO"<<endl;
	}
	return 0;
}

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

int main(){
	int n, a, b, c;
	cin >> n;
	while(cin >> a >> b >> c){
		if(b < c)
			swap(b, c);
		if(a < b)
			swap(a, b);
		if(b < c)
			swap(b, c);
		if(pow(a, 2) == pow(b, 2)+pow(c, 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( b > a ) swap( a, b );
		if( c > b ) {
			swap( b, c );
			if( b > a ) swap( a, b );
		}
		cout << (( a * a == b * b + c * c ) ? "YES\n" : "NO\n");
	}	
	return 0;
}

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

#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORTASC(c) sort((c).begin(),(c).end())
#define SORTDESC(c,t) sort((c).begin(),(c).end(), std::greater<t>());
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

const double PI  = acos(-1.0);

using ll = long long;
using namespace std;

int main() {
    ll n;

    cin >> n;
    
    ll a, b, c;
    REP(i, n){
        vector<ll> v;
        cin >> a >> b >> c;
        v.PB(a);
        v.PB(b);
        v.PB(c);
        SORTDESC(v, ll);
        if (v[0]*v[0] == v[1]*v[1] + v[2]*v[2]){
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }

    return 0;
}

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

C++: #include <iostream>
#include <algorithm>
using namespace std;
int main(){
    int a,b,c;int n;cin>>n;
    while(cin>>a>>b>>c){
        if(max({a,b,c})*max({a,b,c})*2 == a*a+b*b+c*c)cout << "YES" << endl;
        else cout << "NO" << endl;
    }
}

C++: #include<stdio.h>

int main(void)
{
	int i;
	int x[999]={0},y[999]={0},z[999]={0},hantei[999]={0};
	int j=0,e =0;

	while(e==0)
	{
		scanf("%d %d %d",&x[j],&y[j],&z[j]);
		
		if(x[j]<1 || 1000<x[j] || y[j]<1 || 1000<y[j] || z[j]<1 || 1000<z[j])break;

		j=j+1;
	}

	for(i=0;i<=j;i++)
	{
		if(y[i]<x[i] && z[i]<x[i])
		{
			if(x[i]*x[i] == y[i]*y[i]+z[i]*z[i])
				hantei[i]=1;
		}
		else if(x[i]<y[i] && z[i]<y[i])
		{
			if(y[i]*y[i] == x[i]*x[i]+z[i]*z[i])
				hantei[i]=1;
		}
		else
		{
			if(z[i]*z[i] == x[i]*x[i]+y[i]*y[i])
				hantei[i]=1;
		}
	for(i=0;i<j;i++)
	  {   
	   switch(hantei[i])
	    {
		   case 0:
			  printf("NO\n");
			  break;
		   case 1:
			  printf("YES\n");
		      break;
	   }
	  }
	}

	return 0;
}