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"
	} 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)

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 <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;
}