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 <iostream>
#include <string>
using namespace std;

bool IsRightTriangle(const int a, const int b, const int c)
{
	if(a <= b){
		if(b <= c){
			if(c*c == a*a + b*b){
				return true;
			}else{
				return false;
			}
		}else{
			if(b*b == c*c + a*a){
				return true;
			}else{
				return false;
			}
		}
	}else{
		if(a <= c){
			if(c*c == a*a + b*b){
				return true;
			}else{
				return false;
			}
		}else{
			if(a*a == b*b + c*c){
				return true;
			}else{
				return false;
			}
		}
	}
}

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

C++: #include <cstdio>

using namespace std;

int main(){
	int N;
	scanf("%d",&N);
	for(int i=0;i<N;i++){
		int a,b,c;
		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){
			puts("YES");
		}
		else puts("NO");
	}
	return 0;
}

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

#define Triangle(s1,s2,s3) if(s1*s1+s2*s2==s3*s3)
using namespace std;

int main()
{
	int n;
	int h[3];
	vector<int> side;
	int i;
	
	cin >> n;
	
	for(i=0;i<n;i++)
	{
		side.clear();
		
//		vector<int>::iterator it=side.begin();
		
		for(int j=0;j<3;j++)
		{
			cin >> h[j];
			side.push_back(h[j]);
//			cout << "side: " << side[j] << endl;
		}
		
		sort(side.begin(),side.end());
		
//		it=side.begin();
		
//		cout << endl;
		
//		for(;it!=side.end();it++)
//			cout << *it << " " ;
		
//		cout << endl;
		
//		cout << "side1:" << side[0]*side[0] << " side2:" << side[1]*side[1] << " side3:" << side[2]*side[2] << endl;
		
		Triangle(side[0],side[1],side[2])
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}
}

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

int max(int *a);

int main(){
  int n,tmp[3];
  cin>>n;
  for(int i = 0;i < n;i++){
    cin>>tmp[0]>>tmp[1]>>tmp[2];
    sort(tmp,tmp + 3,greater<int>());
    if(tmp[0]*tmp[0] == tmp[1]*tmp[1] + tmp[2]*tmp[2])cout<<"YES"<<endl;
    else cout<<"NO"<<endl;
  }
return 0;
}

C++: #include<iostream>


using namespace std;

int main(void)
{
int n,a = 0,b = 0,c = 0;
cin>>n;

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

        if(c*c == (b*b+a*a)|| (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>
#include<string>
#include<vector>

int main()
{
	int n;
	
	std::cin >> n;
	std::vector<std::string>answer;
	for(int i = 0;i < n;i++)
	{
		std::vector<int>length(3);
		for(int i = 0;i < 3;i++)
		{
			std::cin >> length[i]; 
		}
		std::sort(length.begin(),length.end());
		if((length[0]*length[0]) + (length[1]*length[1]) == (length[2]*length[2]))
		{
			answer.push_back("YES");
		}
		else
		{
			answer.push_back("NO");	
		}
	}

	for(int i = 0;i < n;i++)
	{
		std::cout << answer[i] << std::endl;
	}

	return 0;
}

C++: #include <iostream>
#include <vector>
#include <set>
#include <map>
#include <list>
#include <iterator>
#include <queue>
#include <stack>
#include <deque>
#include <sstream>
#include <algorithm>
#include <numeric>
#include <string>
#include <cmath>
#include <complex>
#include <functional>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cassert>
#include <cstdlib>
#include <cctype>
#define REP(i,m,n) for(int i=m;i<n;i++)
#define rep(i,n) for(int i=0;i<n;i++)
#define rp(i,c) rep(i,(int)c.size())
#define fr(i,c) for(__typeof((c).begin()) i=(c).begin();i!=(c).end();i++)
#define mp make_pair
#define pb push_back
#define all(c) (c).begin(),(c).end()
#define rall(u) (u).rbegin(),(u).rend()
#define dbg(x) cerr<<#x<<" = "<<(x)<<endl
#define v_delete(a,b) (a).erase(remove((a).begin(), (a).end(), b), (a).end())
#define v_unique(a) (a).erase(unique((a).begin(), (a).end()), (a).end())
#define VV(T) vector<vector< T > >
#define init(a,b) memset((a), (b), sizeof((a)))
using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> pi;
const int inf=1<<28;
const double INF=1e10,EPS=1e-9;


template<class T>int SIZE(T a){return a.size();}
template<class T>string IntToString(T num){string res;stringstream ss;ss<<num;return ss.str();}
template<class T>T StringToInt(string str){T res=0;for(int i=0;i<SIZE(str);i++)res=(res*10+str[i]-'0');return res;}
template<class T>T gcd(T a,T b){if(b==0)return a;return gcd(b,a%b);}
template<class T>T lcm(T a,T b){return a/gcd(a,b)*b;}

template <class T> void input(T& a, int n) { for (int i = 0; i < n; ++i) cin >> a[i]; }
template <class T> void input(T* a, int n) { for (int i = 0; i < n; ++i) cin >> a[i]; }
typedef pair<int,int> pii;

inline bool IN(int x, int y, int w, int h)
{
    return 0 <= x && x < w && 0 <= y && y < h;
}


int main()
{
	int n;
	while(cin >> n,n){
		rep(nn,n){
			int l[3];
			rep(i,3){
				cin >> l[i];
			}
			sort(l,l+3);
			if(pow(l[2],2.0)==pow(l[1],2.0)+pow(l[0],2.0)){
				cout << "YES" << endl;
			}else{
				cout << "NO" << endl;
			}

		}
	}

	return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int n,i,w,a,s,d,x,j,z;
		scanf("%\n",&n);
		for(i=0;i<n;i++){
			scanf("%d %d %d",&a,&s,&d);
			if(a>s&&d<a){
				w=(d*d)+(s*s);
				x=a*a;
					if(w==x){
						printf("YES\n");
					}
					else{
						printf("NO\n");
					}	
			}	
			if(a<d&&d>s){
				w=(a*a)+(s*s);
				x=d*d;
					if(w==x){
						printf("YES\n");
					}
					else{
						printf("NO\n");
					}				
			}
			if(a<s&&s>d){
				w=(d*d)+(s*s);
				x=s*s;
					if(w==x){
						printf("YES\n");
					}
					else{
						printf("NO\n");
					}				
			}
			if(a==s&&s==d&&d==a){
				printf("NO\n");
			}	
		
		}
	return 0;
}

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++)
		{
			vector<int> arr(3);
			for (int i = 0; i < n; i++) cin >> arr[i];
			sort(ALL(arr));
			cout << (arr[2] * arr[2] == arr[0] * arr[0] + arr[1] * arr[1] ? "YES" : "NO") << endl;
		}
	}
	return 0;
}