Go: package main

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

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)
		fmt.Fprintln(out, checkTriangle(data))
	}
}

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
}

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"
	}
	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 <stdbool.h>

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

C++: #include <iostream>
using namespace std;
int main() {
  int N, s1, s2, s3;
  cin >> N;
  for(int i = 0; i < N; ++i) {
	cin >> s1 >> s2 >> s3;
	if(s1*s1 + s2*s2 == s3*s3) cout << "YES" << endl;
	else if(s2*s2 + s3*s3 == s1*s1) cout << "YES" << endl;
	else if(s1*s1 + s3*s3 == s2*s2) cout << "YES" << endl;
	else cout << "NO" << endl;
  }
  return 0;
}

C++: #include<iostream>
#include<math.h>
#include<algorithm>
using namespace std;
int main(){
    int n,a[3],b[3],l,k;
    cin>>n;
    for(l=0;l<n;l++){
        for(k=0;k<3;k++){
            cin>>a[k];
            if(a[k]>1000||a[k]<=0||l>1000){
                break;
            }
            b[k]=a[k]^2;
        }
        sort(b,b+3);
        if(b[2]==b[0]+b[1]){
            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] = { 0 };
		for (int i = 0; i < 3; i++)cin >> a[i];
		sort(a, a + 3);
		if (a[0] * a[0] + a[1] * a[1] == a[2] * a[2]) {
			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>
#include <vector>
#include <string>
using namespace std;

int main() {
	int x, n, m, l;
	vector<string> v;
	
	cin >> x;

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

		if(l*l == n*n + m*m) {
			v.push_back("YES");
		} else {
			v.push_back("NO");
		}
	}

	for(int i = 0; i < v.size(); i++) {
		cout << v[i] << endl;
	}

	return 0;
}

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

}
return 0;
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
/*
int MaxPos(int i[3]){
	int max=0,pos;
	for(int n=0;n<3;n++){
		if(max<i[n]){
			max=i[n];
			pos=n;
		}
	}
	return pos;

}

int main(){
	int N;
	cin >> N;
	while(N--){
		int i[3],c;
		int max;
		cin >> i[0] >> i[1] >> i[2];
		max = MaxPos(i);
		c = i[max];
		i[max]=0;
		if(i[0]*i[0]+i[1]*i[1]+i[2]*i[2] == c*c)
			cout<<"YES\n";
		else
			cout<<"NO\n";
	}
}
*/

int main(){
	int N;
	cin >> N;
	while(N--){
		int i[3],c;
		int max;
		cin >> i[0] >> i[1] >> i[2];
		sort(i,i+2);
		if(i[0]*i[0]+i[1]*i[1]==i[2]*i[2])
			cout<<"YES\n";
		else
			cout<<"NO\n";

	}
}

C++: #include <iostream>
#include<algorithm>
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){
			swap(a,c);
		}
		if(b>c){
		  swap(b,c);
		}
		if(a*a+b*b==c*c)
			cout<<"YES"<<endl;

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

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

int main(){
	int n, a, b, c, x, y, z;
	
	cin >> n;
	while(n--){
		cin >> a >> b >> c;
		int sum = a + b + c;
		x = max(a,max(b,c));
		y = min(a,min(b,c));
		z = sum - x - y;
		
		if(y*y + z*z == x*x)
			cout << "Yes" << endl;
		else
			cout << "No" << endl;
	}
	
    return 0;
}

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

int main()
{
	int a[3];
	while(cin >> a[0] >> a[1] >> a[2] && a[0] != EOF)
	{
		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>
#include<string>
#include<cmath>
#include<vector>
#include<stack>
#include<queue>
#include<algorithm>
#include<complex>
using namespace std ;
typedef vector<int> vi ;
typedef vector<vi> vvi ;
typedef vector<string> vs ;
typedef pair<int, int> pii; 
typedef long long ll ;

#define loop(i,a,b) for(int i = a ; i < b ; i ++)
#define rep(i,a) loop(i,0,a)
#define all(a) (a).begin(),(a).end()

int main(void){
  vi inp(3);
  int n ;
  cin >> n ;
  while(n--){
    rep(i,3)
      cin >> inp[i] ;
    sort(all(inp));
    if(inp[0]*inp[0]+inp[1]*inp[1]==inp[2]*inp[2])
      cout << "YES" << endl;
    else 
      cout << "NO" << endl;
  }
}

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

C++: #include <iostream>
using namespace std;
  
//0003
int main(){
    int n;
    int a, b, c, a2, b2, c2;
    cin >> n;
    while(n--){
        cin >> a >> b >> c;
        a2 = a*a;
        b2 = b*b;
        c2 = c*c;
 
        if(a2==b2+c2 || b2==a2+c2 || c2==a2+b2){
            cout << "YES" << endl;
        }else{
            cout << "NO" << endl;
        }
    }
    return 0;
}

C++: /*
???????????£?????´??°?????\?????????????????????????????????????????¨??????????§???¢???
??´?§?????§???¢??§????????´????????? YES ??????
????????´????????? NO ??¨????????????????????°?????????????????????????????????
*/

#include <iostream>


using namespace std;
 
int main()
{

	int a, b, c, d1, d2, d3, i, N = 0;

		cin >> N;

	for ( i = 0; i < N; i++ ) {
		
		cin >> a >> b >> c;

		d1 = a * a;
		d2 = b * b;
		d3 = c * c;

		if ( d1 == ( b * b ) + ( c * c ) ) {
			cout << "YES" << endl;
		} else if ( d2 == ( a * a ) + ( c * c ) ) {
			cout << "YES" << endl;
		} else if ( d3 == ( a * a ) + ( b * b ) ) {
			cout << "YES" << endl;
		} else {
			cout << "NO" << endl;
		}
	}
	return 0;
}

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

int main()
{
	int nNum=0;
	cin>>nNum;
	int nIn[3]={0};
	while(nNum--)
	{
		cin>>nIn[0]>>nIn[1]>>nIn[2];
		int nMax=max(max(nIn[0],nIn[1]),nIn[2]);
		if(nMax*nMax==nIn[0]*nIn[0]+nIn[1]*nIn[2]+nIn[2]*nIn[2]-nMax*nMax)
		{
			cout<<"YES"<<endl;
		}
		else
		{
			cout<<"NO"<<endl;
		}
	}
	return 0;
}

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

int N ;
int a,b,c,x,y,z ;

int main()
{
	cin >> N ;

	for( int i = 0 ; i < N ; i ++ )
	{
		cin >> a >> b >> c ;

		x = max( a, max( b, c ) ) ;
		y = min( a, max( b, c ) ) ;
		z = min( a, min( b, c ) ) ;

		if( ((x*x) == ((y*y) + (z*z))) || ((y*y) == ((x*x) + (z*z))) || ((z*z) == ((x*x) + (y*y))) )
		{
			cout << "YES" << endl ;
		}
		else
		{
			cout << "NO" << endl ;
		}
	}
}