Go: package main

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

func main() {
	n, err := strconv.Atoi(strScan())
	if err != nil {
		fmt.Println("数字を入力して下さい。")
	} else {
		var counter int = n
		var judgeArr []string
		scanner := bufio.NewScanner(os.Stdin)
		for scanner.Scan() {
			strArr := strings.Fields(scanner.Text())
			castNumArr := StringToInt(strArr)
			judgeArr = append(judgeArr, checkTriangle(castNumArr))
			counter--
			if counter == 0 {
				break
			}
		}
		for _, v := range judgeArr {
			fmt.Println(v)
		}
	}
}

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

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

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

using namespace std;

int main() {
    int n;

    cin >> n;

    while (n--) {
        int a[3];

        cin >> a[0] >> a[1] >> a[2];
        sort(a, a + 3);

        if (a[2] * a[2] == a[0] * a[0] + a[1] * a[1]) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }

    return 0;
}

C++: #include<stdio.h>
main()
{
    int i,j,k,l,a,b,c,d,e,p,q,x,y,z;
    scanf("%d",&p);
    for(q=1; q<=p; q++)
    {
        scanf("%d %d %d",&a,&b,&c);
        if(a>b&&a>c)
        {
            i=a;
            j=b;
            k=c;
        }
        else if(b>a&&b>c)
        {
            i=b;
            j=a;
            k=c;
        }
        else if(c>a&&c>b)
        {
            i=c;
            j=a;
            k=b;
        }
        x=i*i;
        y=j*j;
        z=k*k;
        if(x==y+z)
        {
            printf("YES\n");
        }
        else
        {
            printf("NO\n");
        }
    }
    return 0;
}

C++: #include <stdio.h>
#include <algorithm>

using namespace std;

int main(void)
{
	int a[3];
	int n;
	
	scanf("%d", &n);
	for (int i = 0; i < n; i++){
		for (int j = 0; j < 3; j++){
			scanf("%d", &a[j]);
		}
		
		sort(a, a + 3);
		reverse(a, a + 3);
		
		if (a[0] * a[0] == (a[1] * a[1]) + (a[2] * a[2])){
			puts("YES");
		}
		else {
			puts("NO");
		}
	}
	
	return (0);
}

C++: #include<stdio.h>
#include<string.h>
#define N 3

int main()
{
    int i, j, a, b, c;
    int A[N][10];

    scanf("%d",&a);
    if(a<=1000){
        for(i=0;i<a;i++){
            for(j=0;j<N;j++){
                scanf("%d", &b);
                if(1>b || b>1000){   
                    return 1;
                }else{
                    if(j!=0 && b<A[i][j-1]){
                        c = A[i][j-1];
                        A[i][j-1] = b;
                        A[i][j] = c;
                    }else{
                        A[i][j] = b;
                    }
                }
            }

        }
        for(i=0;i<a;i++){
            if(A[i][0]*A[i][0]+A[i][1]*A[i][1]==A[i][2]*A[i][2]){
                printf("YES\n");
            }else{
                printf("NO\n");
            }
        }
    }
    return 0;
}

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <cstdio>
#include <vector>
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
using namespace std;

int main(){
    int n, x[3], i;
    cin >> n;
    REP(i, n){
        int y[3];
        cin >> x[0] >> x[1] >> x[2];
        sort(x, x+3);
        REP(j, 3)
            y[j] = x[j] * x[j];
        if(y[2] == y[0]+y[1])
            printf("YES\n");
        else
            printf("NO\n");
    }
}

C++: #include<iostream>
#include<algorithm>
#include<math.h>
using namespace std;
#define MAX_N 1000
int A[3];//三辺の長さの情報
bool Tri[MAX_N];//その三角形が直角三角形かどうか
int N;//データの個数

int main(){
  scanf("%d",&N);
  for(int j = 0;j < N;j++){
    for(int i = 0;i < 3;i++){
      cin >>A[i];
    }
    sort(A,A+3);
     Tri[j] = false;
     if(pow(A[2],2) ==pow(A[1],2) + pow(A[0],2)) {
      Tri[j] =true;
    }
    if(Tri[j])
      cout <<"YES"<<endl;
    else
      cout <<"NO"<<endl;
  }
  return 0;
}

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

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef complex<double> P;
typedef pair<int,int> pii;
#define REP(i,n) for(ll i=0;i<n;++i)
#define REPR(i,n) for(ll i=1;i<n;++i)
#define FOR(i,a,b) for(ll i=a;i<b;++i)

#define DEBUG(x) cout<<#x<<": "<<x<<endl
#define DEBUG_VEC(v) cout<<#v<<":";REP(i,v.size())cout<<" "<<v[i];cout<<endl
#define ALL(a) (a).begin(),(a).end()

#define MOD (ll)(1e9+7)
#define ADD(a,b) a=((a)+(b))%MOD
#define FIX(a) ((a)%MOD+MOD)%MOD

int main(){
  int n;
  while(n--){
    int a,b,c;
    cin>>a>>b>>c;
    if(abs(a-b)<c && c<a+b){
      cout<<"YES"<<endl;
    }else{
      cout<<"NO"<<endl;
    }
  }
  return 0;
}

C++: #include<stdio.h>
int main(){
	int N,x,y,z,i;
	scanf("%d",&N);
	for(i=0;i<N;i++){
		scanf("%d %d %d",&x,&y,&z);
			if(x^2+y^2==z^2||x^2+z^2==y^2||y^2+z^2==x^2){
				printf("Yes\n");
			}
			else {
				printf("No\n");
			}
		}
	return 0;
}