Go: // 九九を出すだけ
package main
import (
	"fmt"
	"os"
	"bufio"
	"strconv"
	"sort"
)

var sc = bufio.NewScanner(os.Stdin)
var out = bufio.NewWriter(os.Stdout)

func main(){
	sc.Split(bufio.ScanWords)
	defer out.Flush()
	n := nextInt()
	for i:=0; i<n; i++{
	    data := nextInts(3)
	    sort.Ints(data)
	    if data[0]*data[0]+data[1]*data[1] == data[2]*data[2]{
	        fmt.Fprintln(out, "YES")
	    }else{
	        fmt.Fprintln(out, "NO")
	    }
	}
}

func next() string{
	sc.Scan()
	return sc.Text()
}

func nextInt() int{
	a, _ := strconv.Atoi(next())
	return a
}

func nextInts(n int) []int{
    a := make([]int, n)
    for i:=0; i<n; i++{
        a[i] = nextInt()
    }
    return a
}

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

bool check(const int* array);
int main(void) {
    int length[3];
    
    while(cin >> length[0] >> length[1] >> length[2]) {
        sort(length, length + 3);
        if(check(length)) {
            cout << "Yes" << endl;
        } else {
            cout << "No" << endl;
        }
    }
}

bool check(const int* array) {
    if(array[0] * array[0] + array[1] * array[1] == array[2] * array[2]) {
        return true;
    } else {
        return false;
    }
}

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

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

int main(){
  int n,tri[3];

  cin >> n;

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

  return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<math.h>
using namespace std;
int main(){
	int j,i;
	double n,a[3],k;
	cin>>n;
	for(i=0;i<n;i++){
		for(j=0;j<3;j++){
			cin>>a[j];
		}
		sort(a,a+3);
		k=((a[0]*a[0])+(a[1]*a[1]));
		if(sqrt(k)==a[2]){
			cout<<"YES"<<endl;
		}else{
			cout<<"NO"<<endl;
		}
	}
	return 0;
}

C++: #include <iostream>
int main(void){
	int n,a,b,c,d;
	std::cin>>n;
	while(n--){
		std::cin>>a>>b>>c;
		if (a>b){d=a;a=b;b=d;};
		if (b>c){d=b;b=c;c=d;};
		std::cout<<(a*a+b*b==c*c?"YES\n":"NO\n");
	}
}

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

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

#define int long long int
#define main signed main()
#define bye return 0
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
#define each(p, v) for (auto p = (v).begin(); p != (v).end(); p++)
#define all(v) (v).begin(), (v).end()
#define prec(n) fixed << setprecision(n)
#define dump(x) cerr << "(L" << __LINE__ << ") " << #x << " = " << (x) << endl
#define clr(x, a) memset(x, a, sizeof(x))

#define sum(v) accumulate(all(v), 0)
#define stlice(from, to) substr(from, (to) - (from) + 1)
#define odd(n) ((n) % 2)
#define even(n) (!odd(n))

#define INF 1000000000
#define MOD 1000000007

#define pb push_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
#define vi vector<int>
#define vb vector<bool>
#define vc vector<char>

using namespace std;

main {
  int n;
  cin>>n;
  rep(i,n) {
    int a,b,c;
    cin>>a>>b>>c;
    a*=a; b*=b; c*=c;
    cout<<(a+b==c||b+c==a||c+a==b?"YES":"NO")<<endl;
  }
  bye;
}

C++: i;main(a,b,c){for(scanf("%*d"),i=10;i--&&~scanf("%d%d%d",&a,&b,&c);puts((a+b-c&&b+c-a&&a+c-b)?"NO":"YES"))a*=a,b*=b,c*=c;exit(0);}

C++: 
#include <string>
#include <sstream>
#include <iostream>

int main(void) 
{
    std::string str;
    int lens[3];
    int nolines;

    getline(std::cin, str);
    std::istringstream str_s(str);

    str_s >> nolines;

    int i;
    for (i = 0; i < nolines; i++) {
        getline(std::cin, str);
        std::istringstream str_s(str);

        str_s >> lens[0] >> lens[1] >> lens[2];

        std::sort(lens, lens+3);

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

    return 0;
}

C++: main(a,b,c){
for(scanf("%*d");~scanf("%d%d%d",&a,&b,&c);
puts((a+b-c&&a+c-b&&b+c-a)?"NO":"YES"))
a*=a,b*=b,c*=c;
exit(0);
}

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


using namespace std;

string check(int a,int b,int c){
	if(a*a+b*b==c*c)return "YES";
	else return "NO";
}


int main(){
	int n;
	cin>>n;
	for(int i=0;i<n;i++){
		vector<int> n;
		int a,b,c;
		cin>>a>>b>>c;
		n.push_back(a);
		n.push_back(b);
		n.push_back(c);
		sort(n.begin(),n.end());
		string ans=check(a,b,c);
		cout<<ans<<endl;
	}
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
#define REP(i,N) for(int i = 0; i < (int)N; i++)

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

C++: #include<iostream>
#include<math.h>

using namespace std;

int main()
{
        double c[3];
        int i = 0;
        int temp = 0;
        int data = 0;
        int j = 0;
        int count = 0;
        double hoge,fuga;

        cin >> data;

        while(j<data)
        {
                count = 0;
                cin >> c[0] >> c[1] >> c[2];
                while(count<2){
                for(i=0;i<2;i++)
                {
                        if(c[i]<c[i+1])
                        {
                                temp = c[i];
                                c[i]=c[i+1];
                                c[i+1]=temp;
                        }

                }
                count++;
                }
                hoge = pow(c[0],2.0);
                fuga = pow(c[1],2.0) + pow(c[2],2.0);

                if(hoge == fuga)
                {
                        cout << "YES" << endl;
                }
                else
                {
                        cout << "NO" << endl;
                }

                j++;
        }
}

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

C++: #include<stdio.h>
int main(void)
{
	int n=1;
	int i=0;
	int a,b,c;
	int irekae=0;
	
	while(n!=0)
	{
		scanf("%d",&n);
		if (n==0)
		{

		}
		else
		{
			for (i=1;i<=n;i++)
			{
				scanf("%d",&a);
				scanf("%d",&b);
				if (a<b)
				{
					irekae=a;
					a=b;
					b=irekae;
				}
				scanf("%d",&c);
				if (a>c)
				{
					irekae=a;
					a=c;
					c=irekae;
				}
				if (c*c==a*a+b*b)
				{
					printf("Yes\n");
				}
				else
				{
					printf("No\n");
				}
			}
		}
	}
	return 0;
}