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>
using namespace std;

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

  while(T--){
    int a, b, c;
    cin >> a >> b >> c;

    a *= a;
    b *= b;
    c *= c;

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

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

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+N);
     Tri[j] = false;
    if(A[2]*A[2] == A[1]*A[1] + A[0]*A[0]&&A[0] !=0) {
      Tri[j] =true;
    }
    if(Tri[j])
      cout <<"YES"<<endl;
    else
      cout <<"NO"<<endl;
  }
  return 0;
}

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

int main(void){
	int n;

	cin>>n;
	while(n--){
		int a,b,c;

		cin>>a>>b>>c;
		a *= a;
		b *= b;
		c *= c;

		if(a+b==c || b+c==a || c+a==b){
			cout<<"YES\n";
		}
		else{
			cout<<"NO\n";
		}
	}

	return 0;
}

C++: #include <cstdio>

int main(){
	int n;
	int a[3];
	scanf("%d",&n);

	for (int i=0;i<n;++i){
		for (int j=0;j<3;++j) scanf("%d",a+j);
		bool z=false;
		for (int k=0;k<3;++k)
			if (a[k]*a[k]+a[(k+1)%3]*a[(k+1)%3]==a[(k+2)%3]*a[(k+2)%3])
				z=true;
		if (z) printf("YES\n");
		else printf("NO\n");
	}
	return 0;
}

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

	int a;
	int b;
	int c;
	int d;

		cin >> d;

		for(int i=1; i<=d; i++){

	cin >> a >> b >> c;

	if(a*a+b*b==c*c || b*b+c*c==a*a || a*a+c*c==b*b){

	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(a*a == b * b + c * c){
      		cout << "YES" << endl;
    	} else if(b*b == a * a + c * c){
    	  		cout << "YES" << endl;
    	} else if(c*c == b * b + a * a){
     	 cout << "YES" << endl;
    	} else {cout <<"NO" << endl;} 
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
int main(void){
	int N,a,b,c;
	cin>>N;
	for(int i=1;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>

int IIRT(int a, int b, int c);

int main()
{
    int n;
    std::cin >> n;
    for (int i=0; i<n; i++) {
        int a,b,c;
        std::cin >> a >> b >> c;
        if (IIRT(a,b,c)) {
            std::cout << "YES" << std::endl;
        } else {
            std::cout << "NO"  << std::endl;
        }
    }
}

int IIRT(int a, int b, int c)
{
    if ((a*a + b*b) == c*c) {
        return 1;
    } else if ((b*b + c*c) == a*a) {
        return 1;
    } else if ((c*c + a*a) == b*b) {
        return 1;
    } else {
        return 0;
    }
}

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

bool check_right_triangle(int a, int b, int c)
{
    if(a * a == b * b + c * c || b * b == c * c + a * a || c * c == a * a + b * b)
        return true;
    else return false;
}

int main()
{
    const int max_num_of_data = 1000;
    const int min = 1;
    const int max = 1000;
    
    int num_of_data;
    //std::cout << "データ数の入力" << std::endl;
    std::cin >> num_of_data;
    if(num_of_data > max_num_of_data){
        std::cout << "データ数<=" << max_num_of_data << std::endl;
        return 1;
    }
    
    int a, b, c;
    //std::cout << num_of_data << "個の整数データa b cの入力" << std::endl;
    for(int i = 0; i < num_of_data; ++i){
        std::cin >> a >> b >> c;
        if(min <= a && a <= max && min <= b && b <= max && min <= c && c <= max){
            if(check_right_triangle(a, b, c))
                std::cout << "Yes" << std::endl;
            else
                std::cout << "No" << std::endl;
        }else{
            --i;
            std::cout << "整数は" << min <<"以上" << max << "以下に設定" << std::endl;
        }
    }

    return 0;
}

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

int main()
{
    long long int a,b,c,n,d,e;
    cin>>n;
    for(int i=0; i<n; i++)
    {
        cin>> a >> b >> c;
        d=(a*a)+(b*b);
        e=c*c;
        if(d==e)
        {
            cout<<"YES"<<endl;
        }
        else
        {
            cout<<"NO"<<endl;
        }
        d=0;
        e=0;
    }
    return 0;
}

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

int main(){
  int n,i;
  int a,b,c;
  cin >> n;
  
  if( n <= 1000){
    for(i = 0; i < n ; i++){
      cin >>a >> b >> c ;
      if( 1 <= a && a <= 1000 && 1 <= b && b <= 1000 && 1 <= c && c <= 1000){
	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;
      }
    }
  }
  
  return 0;
}

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

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

int main() {
	// your code goes here
	int n;
	cin >> n;
	for (int i;i<n;i++) {
		int a,b,c,aa,bb,cc;
		cin >> a >> b >> c;
		if (a>b&&a>c) {
			aa = a;
			bb = b;
			cc = c;
		}
		if (b>a&&b>c) {
			aa = b;
			bb = a;
			cc = c;
		}
		if (c>a&&c>b) {
			aa = c;
			bb = a;
			cc = b;
		}
		
		if (aa*aa == bb*bb + cc*cc) {
			cout << "YES" << endl;
		}
		if (aa*aa != bb*bb + cc*cc) {
			cout << "NO" <<endl;
		}
	}
	return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <math.h>
#include <vector>
#include <queue>
#include <algorithm>
#include <iterator>
#include <sstream>
#include <string>
using namespace std;
#define rep(I,N) for(int I = 0; I < (int)(N); I++)
#define FIN(V) cout<<V<<endl
#define pb push_back
#define INF (1 << 30)
typedef pair<int, int> P;
typedef long long ll;
typedef priority_queue<int> pq;

int main(void){
	int N;
	cin >> N;
	rep(k, N){
		int a, b, c;
		cin >> a >> b >> c;
		a = pow(a, 2);
		b = pow(b, 2);
		c = pow(c, 2);
		FIN(a);
		FIN(b);
		FIN(c);
		bool flag = false;
		if(sqrt(c) == sqrt(a + b))flag = true;
		if(sqrt(b) == sqrt(a + c))flag = true;
		if(sqrt(a) == sqrt(b + c))flag = true;
		if(flag)cout << "YES"<<endl;
		else FIN("NO");

	}

	return 0;	
}

C++: /* All men have limits. They learn what they are and learn
   not to exceed them, I ignore mine. -Batman           */
#include <bits/stdc++.h>
//#include <iostream>
//#include <vector>
//#include <Windows.h>
using namespace std;

int main(){
int a,b,c,d;
cin>>a;
while(a--){
	cin>>b>>c>>d;
	if(b*b+c*c==d*d||b*b+d*d==c*c||d*d+c*c==b*b)
	cout<<"YES"<<endl;
	else cout<<"NO"<<endl;
}

return 0;
}