Go: package main
import (
        "fmt"
)

func main() {
        var num int
        fmt.Scan(&num)

        for i := 0; i < num; i++ {
                s1 := 0
                s2 := 0
                s3 := 0
                var chk int = 0
                fmt.Scanf("%d %d %d", &s1, &s2, &s3)
                if s1 >= s2 {
                        if s1 > s3 {
                                chk = 1
                        } else {
                                chk = 3
                        }
                } else {
                        if s2 >= s3 {
                                chk = 2
                        } else {
                                chk = 3
                        }
                }

                if (chk == 1 && s1*s1 == s2*s2 + s3*s3) ||
                        (chk == 2 && s2*s2 == s3*s3 + s1*s1) ||
                        (chk == 3 && s3*s3 == s1*s1 + s2*s2) {
                        fmt.Printf("YES\n")
                } else {
                        fmt.Printf("NO\n")
                }
        }
}

C++: #include <cstdio>

int main(){
	int n,s[5],tmp;
	int a[1010];int b[1010];int c[1010];

	scanf("%d",&n);

	for(int i =1;i<=n;i++){
		scanf("%d %d %d",&s[1],&s[2],&s[3]);
		int x = 1;
		while(x > 0){
			x=0;
			for(int k = 1;k<3;k++){
				if(s[k] > s[k+1]){
					tmp=s[k];s[k]=s[k+1];s[k+1]=tmp;x++;
				}
			}
		}
		c[i] = s[3];b[i]=s[2];a[i]=s[1];
	}

	for(int j =1;j<=n;j++){
		if((c[j]*c[j]) == ((a[j]*a[j])+(b[j]*b[j]))){
			printf("YES\n");
		}else{
			printf("NO\n");
		}
	}
}

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

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 <iostream>

using namespace std;

int main() {
  int n;
  cin >> n;

  for (int i = 0; i < n; i++) {
    int a[3];
    cin >> a[0] >> a[1] >> a[2];

    int max = 0;
    for (int i = 0; i < 3; i++) {
      max = a[i] > max ? a[i] : max;
    }

    for (int i = 0; i < 3; i++) {
      a[i] = a[i] == max ? 0 : a[i];
    }

    max *max == a[0] * a[0] + a[1] * a[1] + a[2] * a[2] ? cout << "Yes" << endl
                                                        : cout << "No" << endl;
  }

  return 0;
}

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

int main (void)
{
	int a,b,c;
	int n;
	
	while (cin >> n){
		for (int i=0; i<n; i++) {
			cin >> a >> b >> c;
			if (a*a + b*b == c*c)	cout << "YES" << endl;
			else 	cout << "NO" << 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*a+b*b==c*c){
			cout<<"YES"<<endl;
		}else if(a*a+b*b!=c*c){
			cout<<"NO"<<endl;
		}
	}	
}

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

using namespace std;

int main()
{
  int n;
  cin >> n;
  for ( int i = 0; i < n; i++ ) {
    vector<int> v;
    int t;
    for ( int j = 0; j < 3; j++ ) {
      cin >> t;
      v.push_back( t );
    }
    sort( v.begin(), v.end() );
    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>
int main(){
	int a,b,c;
	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;

		system("pause");
		
	 return 0;
	}

C++: #include<iostream>
using namespace std;
class DigitNumber{ 
    public:
        void solve(int a,int b){
            string sum=to_string(a+b);
            if(sum=="0")cout<<0<<endl;
            else cout<<sum.length()<<endl;
        }
};
int main(){
    DigitNumber inst;
    int a,b;
    while(cin>>a>>b){ 
        inst.solve(a,b);
    }
}

C++: #include<iostream>


using namespace std;

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

}

return 0;
}

C++: #include<iostream>
#include<iomanip>
#include<cstdlib>
#include<math.h>
#include<algorithm>
#include<string>
#include<vector>
#include<list>
#include<queue>
#include<stack>
#include<set>
#include<map>
#define REP(i, N) for(ll i = 0; i < N; ++i)
#define ALL(a) (a).begin(),(a).end()
#define pb push_back
#define INF 1000000000
#define MOD 1000000007
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
int qx[8] = {1, 1, 0, -1, -1, -1, 0, 1};
int qy[8] = {0, 1, 1, 1, 0, -1, -1, -1};

int main(void) {
	int N;
	cin>>N;
	REP(i, N) {
		vector<int> hoge(3);
		REP(j, 3) cin>>hoge[j];
		sort(ALL(hoge));
		if(hoge[0] * hoge[0] + hoge[1] * hoge[1] == hoge[2] * hoge[2])cout<<"YES"<<endl;
		else cout<<"NO"<<endl;

	}
}

C++: #include <cstdio>
#include <cmath>

bool triangle(int x, int y, int z) {
	return pow((double)x, 2) + pow((double)y, 2) == pow((double)z, 2);
}

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

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

int main(){
	int a, b, c;

	while(cin >> a >> b >> c){
		if(a*a + b*b == c*c){
			cout << "YES" << endl;
		}
		else cout << "NO" << endl;
	}
}

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

int main() {
  int N;
  cin >> N;
  for (auto i=0; i<N; i++) {
    int t[3];
    cin >> t[0] >> t[1] >> t[2];
    sort(t, t+3);
    cout << ( (t[0]*t[0] + t[1]*t[1] == t[2]*t[2]) ? "YES" : "NO" ) << endl;
  }
}

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

int main(){
	cin.tie(0),ios::sync_with_stdio(false);
	int n; cin>>n;
	for(int i=0;i<n;++i){
		vector<int>v(3); for(auto&&j:v)cin>>j;
		sort(v.begin(),v.end());
		int&a=v.back(),&b=v.front(),&c=v.at(1);
		cout<<(a*a==b*b+c*c?"YES"s:"NO"s)<<"\n"s;
	}
}

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

*/
int main() {
	priority_queue<int> pq;
	int n, a;
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> a;
		pq.push(a);

		int a, b, c;
		a = pq.top(); pq.pop();
		b = pq.top(); pq.pop();
		c = pq.top(); pq.pop();
		cout << (a*a == b*b + c*c ? "YES" : "NO") << endl;
	}
	return 0;
}

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

int main()
{
    int n;
    int a,b,c;
    cin>>n;
    for(int i=0; i<n; i++)
    {
        cin>>a>>b>>c;
        if(a>b&&a>c)
        {
            if(a*a==b*b+c*c)
                cout<<"YES"<<endl;
            else
            cout<<"NO"<<endl;
        }
        if(b>a&&b>c)
        {
            if(b*b==a*a+c*c)
                cout<<"YES"<<endl;
            else
                cout<<"NO"<<endl;
        }
        if(c>a&&c>b)
        {
            if(c*c==b*b+a*a)
                cout<<"YES"<<endl;
            else
                cout<<"NO"<<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*a+b*b==c*c || b*b+c*c==a*a || c*c+a*a==b*b){cout << "YES" <<endl;}
		else{
			cout << "NO" << endl;
		}
	}
	return 0;
}