Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
	"strconv"
	"strings"
)

var sc = bufio.NewScanner(os.Stdin)

func main() {
	sc.Scan()
	l, _ := strconv.Atoi(sc.Text())
	for i := 0; i < l; i++ {
		sc.Scan()
		s := strings.Split(sc.Text(), " ")
		a, _ := strconv.Atoi(s[0])
		b, _ := strconv.Atoi(s[1])
		c, _ := strconv.Atoi(s[2])

		n := []int{a, b, c}
		sort.Sort(sort.IntSlice(n))

		if square(n[0])+square(n[1]) == square(n[2]) {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

func square(x int) int {
	return x * x
}

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

int main() {
    int n;
    std::vector<int> V;
    
    scanf("%d", &n);
    for (int i = 0; i < n; i++) {
        int a, b, c; std::cin >> a >> b >> c;
        V.push_back(pow(a,2)); V.push_back(pow(b, 2)); V.push_back(pow(c, 2));
        std::sort(V.begin(), V.end());
        if (v[2] == v[1] + v[0]) printf("YES\n");
        else printf("NO\n");
    }
    
    return 0;
}

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

int main()
{
	vector <int> v_c;
	v_c.resize(3);
	double e =2.0;
	int N;
	//data set
	cin >> N;
	for(int i = 0; i < N; ++i)
	{
		cin >> v_c[0] >> v_c[1] >> v_c[2];
		sort(v_c.begin(),v_c.end(),greater<int>());
		if( pow(v_c[0],e) == (pow(v_c[1],e)+pow(v_c[2],e)))
		{
			cout << "YES"<<endl;
		} else {
			cout << "NO" << endl;
		}
	}
	return 0;
}

C++: #include <cstdio>
#include <iostream>
#include <cmath>
#include <ctype.h>
#include <string> 
#include <sstream>
#include <iostream>
#include <algorithm>
#include <cstdlib>
#include <map>
#include <queue>
#include <utility>
#include <vector>
#include <set>
#include <list>
#include <cstring>
#include <stack>
   
using namespace std;

bool solve(int a, int b, int c)
{
    return (a * a + b * b == c * c);
}

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

C++: #include"bits/stdc++.h"

#define FOR(i,a,b) for (ll i=(a),__last_##i=(b);i<__last_##i;i++)
#define RFOR(i,a,b) for (ll i=(b)-1,__last_##i=(a);i>=__last_##i;i--)
#define REP(i,n) FOR(i,0,n)
#define RREP(i,n) RFOR(i,0,n)
#define __GET_MACRO3(_1, _2, _3, NAME, ...) NAME
#define rep(...) __GET_MACRO3(__VA_ARGS__, FOR, REP)(__VA_ARGS__)
#define rrep(...) __GET_MACRO3(__VA_ARGS__, RFOR, RREP)(__VA_ARGS__)
template<typename T> ostream& operator<<(ostream& os, const vector<T>& v) {
   REP(i, v.size()) { if (i)os << " "; os << v[i]; }return os;
}
template<typename T> ostream& operator<<(ostream& os, const vector<vector<T>>& v) {
   REP(i, v.size()) { if (i)os << endl; os << v[i]; }return os;
}

using namespace std;


void solve();

int main() {

   solve();
   return 0;

}

void solve() {

	vector<ll> v(3);
	ll n;

	cin >> n;

	REP(i, n) {
		cin >> v[0] >> v[1] >> v[2];
		cout << (v[0]*v[0]+v[1]*v[1]==v[2]*v[2] || v[0]*v[0]+v[2]*v[2]==v[1]*v[1] || v[1]*v[1]+v[2]*v[2]==v[0]*v[0]? "YES": "NO") << endl;
	}

}

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

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

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

C++: //
//  main.cpp
//  b
//
//  Created by h3037178 on 2017/07/31.
//  Copyright ?? 2017??´ ?????£?????????. All rights reserved.
//

#include <iostream>
#include<algorithm>
#include<math.h>
using namespace std;
int main(){
    int n,a,i[3],f[3];
    cin>>n;
    for(int l=0;l<n;l++){
        for(a=0;a<3;a++){
            cin>>i[a];
            if(i[a]<=0){
                break;
            }
            f[a]=i[a]^2;
        }
        sort(f,f+3);
        if(f[2]==f[0]+f[1]){
            cout<<"Yes"<<endl;
        }else{
            cout<<"No"<<endl;
        }
    }
}

C++: #include<stdio.h>
int main(void)
{
	int n=0;
	int i=0;
	int a[1001]={0},b[1001]={0},c[1001]={0};
	int irekae=0;
	int irekae2=0;

	scanf("%d",&n);
	for (i=1;i<=n;i++)
	{
		scanf("%d",&a[i]);
		scanf("%d",&b[i]);
		if (a[i]>b[i])
		{
			irekae=a[i];
			a[i]=b[i];
			b[i]=irekae;
		}
		scanf("%d",&c[i]);
		if (a[i]>c[i])
		{
			irekae=a[i];
			irekae2=b[i];
			a[i]=c[i];
			b[i]=irekae;
			c[i]=irekae2;
		}
		if (a[i]%3==0&&b[i]%4==0&&c[i]%5==0)
		{
			printf("Yes\n");
		}
		else
		{
			printf("No\n");
		}
	}


	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;

int sq(int x){return x*x;}
int main(){
  int n;
  cin>>n;
  for(int i=0;i<n;i++){
    int a,b,c;
    cin>>a>>b>>c;
    cout<<(sq(max([a,b,c]))*2==sq(a)+sq(b)+sq(c) ? "YES" :"NO")<<endl;
  }
  return 0;
}

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

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

C++: #include <stdio.h>

int main(void)
{
	int x, y, z;
	scanf("%d %d %d", &x, &y, &z);
	if (x * x == y * y + z * z || y * y == x * x + z * z || z * z == x * x + y * y) {
		printf("YES\n");
	}else {
		printf("NO\n");
	}
	return 0;
}

C++: #include<iostream>

/*三平方の定理*/
int main() {
	int N,array[3];
	std::cin >> N;
	for (int i = 0; i < N; i++) {
		std:: cin >> array[0] >> array[1] >> array[2];
		for (int l = 0; l < 2; l++) {
			if (array[l] >= array[l + 1]) {
				int tmp;
				tmp = array[l];
				array[l] = array[l + 1];
				array[l + 1] = tmp;
			}
		}
		if (array[2] * array[2] == array[0] * array[0] + array[1] * array[1]) {
			std::cout << "YES" << std::endl;
		}
		else {
			std::cout << "NO" << std::endl;
		}
	}
}

C++: #include <stdio.h>
#include <math.h>
#include <queue>
#include <vector>
using namespace std;
 
int main()
{
    double a,b,c;
    int n,i;
    priority_queue< double, vector<double>, greater<double> > que;
 
    scanf("%d",&n);
 
    for(i = 0; i < n; i++){
        scanf("%lf %lf %lf",&a,&b,&c);
        que.push(a);
        que.push(b);
        que.push(c);
        a = que.top();
        que.pop();
        b = que.top();
        que.pop();
        if(pow( que.top(),2.0 ) == pow( a,2.0 ) + pow( b,2.0 )){
            printf("YES\n");
        }
        else{
            //printf("%lf %lf\n",pow( que.top(),2.0 ),pow( a,2.0 ) + pow( b,2.0 ));
            printf("NO\n");
        }
        que.pop();
    }
 
    return 0;
}

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