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 <bits/stdc++.h>
#include<cmath>
using namespace std;
int main(int argc, char const *argv[])
{
    int n;
    cin>>n;
    while (n--)
        {
            int a,b,c;
            cin>>a>>b>>c;
            if (a*a + b*b-c*c == 0)
            
                cout<<"YES"<<endl;
                else 
                    cout<<"NO"<<endl;
            
        }
    return 0;
}

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

void F(int *a, int*b) {
	int x;
	x = *a;
	*a = *b;
	*b = x;
}

int main() {
	int n, a, b, c;
	cin >> n;
	for (int i = 0;i < n;i++) {
		cin >> a >> b >> c;
		if (c < a)
			F(&c, &a);
		if (c < b)
			F(&c, &b);

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

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

int main() {
    int N;
    cin >> N;
    while (N--) {
        vector<int> a(3);
        for (int i = 0; i < 3; ++i) cin >> a[i];
        sort(a.begin(), a.end());
        cout << (a[0] * a[0] + a[1] * a[1] == a[2] * a[2] ? "YES" : "NO") << endl;
    }
}

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++: #incude <iostream>
using namespace std;

int N,a,b,c;

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

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

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

C++: #include <iostream>
using namespace std;
int main(void){

	int n;

	cin >> n;
	for (int i = 0; i < n; i++){

		int a, b, c;
		cin >> a >> b >> c;

		if (a > c){
			int temp = a;
			a = c;
			c = temp;
		}
		if (b > c){
			int temp = b;
			b = c;
			c = temp;
		}

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

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

using namespace std;

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

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

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

C++: #include <stdio.h>

int main(int argc, char const *argv[])
{
	int a[1000][3];
	int i, j,k, temp;
	int n;
	scanf("%d", &n);
	for(k=0;k<n;k++) {
		scanf("%d%d%d", &a[k][0], &a[k][1], &a[k][2]);
		for(i=2;i>0;i--) {
			for(j=i;j>1;j--) {
				if(a[k][j]<a[k][j-1]) {
					temp = a[k][j];
					a[k][j-1] = a[k][j];
					a[k][j] = temp;
				}
			}
		}
	}
	for(k=0;k<n;k++) {
		if(a[k][0]*a[k][0]+a[k][1]*a[k][1]==a[k][2]*a[k][2]) {
			printf("YES\n");
		} else {
			printf("NO\n");
		}
	}
	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<stdio.h>
#include<math.h>
int main(void)
{
	int n,i,w[1000],a[1000],s[1000],d[1000],x[1000];
	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 <iostream>
#include <string>
using namespace std;

string Judge_triangle(int a,int b,int c){
    if(a+b>c && b+c>a && c+a>b){
        return "YES";
    }
    else{
        return "NO";
    }
}

int main(){
  int N;
  int a,b,c;
  int n=0;
    
    while(1){

  cin >> N;
    
    if(N <= 0 || N > 1000)
        cout << endl;
    else
        break;
    }
    
    string x[N];

while(N > 0 && cin >> a >> b >> c){
    
    
    while(1){
        if(a < 1 || a > 1000 || b < 1 || b > 1000 || c < 1 || c > 1000){
            
            break;
        }
        
        else{
            x[N-1] = Judge_triangle(a,b,c);
            N--;
            n++;
            break;
        }
  }
}
    for(int i = 0;i < n;i++)
        cout << x[i] << 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>c){
			int tmp=a;
			a=c;
			c=tmp;
		}
		if(b>c){
			int tmp;
			b=c;
			c=tmp;
		}
		if(a*a+b*b==c*c)
			cout<<"YES"<<endl;

		else
			cout<<"NO"<<endl;
	}
	return 0;
}

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

int main(){
	int n, a, b, c;
	cin >> n;
	while(cin >> a >> b >> c){
		if(b < c)
			swap(b, c);
		if(a < b)
			swap(a, b);
		if(b < c)
			swap(b, c);
		if(pow(a, 2) == pow(b, 2)+pow(c, 2))
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}
    return 0;
}

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

int main(){
	int n, a, b, c;
	cin >> n;
	for(int i = 0; i < n; ++i){
		cin >> a >> b >> c;
		if( b > a ) swap( a, b );
		if( c > b ) {
			swap( b, c );
			if( b > a ) swap( a, b );
		}
		cout << (( a * a == b * b + c * c ) ? "YES\n" : "NO\n");
	}	
	return 0;
}

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

#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORTASC(c) sort((c).begin(),(c).end())
#define SORTDESC(c,t) sort((c).begin(),(c).end(), std::greater<t>());
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

const double PI  = acos(-1.0);

using ll = long long;
using namespace std;

int main() {
    ll n;

    cin >> n;
    
    ll a, b, c;
    REP(i, n){
        vector<ll> v;
        cin >> a >> b >> c;
        v.PB(a);
        v.PB(b);
        v.PB(c);
        SORTDESC(v, ll);
        if (v[0]*v[0] == v[1]*v[1] + v[2]*v[2]){
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }

    return 0;
}