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<vector>
#include<map>
#include<string>
using namespace std;

int main() {
	int data_sets_num = 0;		//??\???????????????????????????????????°
	std::vector<string> result;
	
	for (int i = 0; i < data_sets_num; i++) {
		int first, second, third;

		cin >> first >> second >> third;
		if (
			(first * first == second * second + third * third) ||
			(second * second == first * first + third * third) ||
			(third * third == second * second + first * first)
			) {
			result.push_back("YES");
		}
		else {
			result.push_back("NO");
		}
	}

	for (unsigned int j = 0; j < result.size(); j++) {
		cout << result[j] << endl;
	}

	return 0;
}

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

#define upper 1000
#define lower 1
#define eN 1000

using namespace std;

bool check(int e1, int e2, int e3){
	if (((e1*e1)+(e2*e2)) == (e3*e3)){
		return true;
	}
	else{
		false;
	}
}

int main(void){
	int N;
	cin >> N;

	vector<bool> result;

	for (int i=0; i<N; ++i){
		if (i == eN){
			break;
		}
		int e1, e2, e3;
		vector<int> len;
		cin >> e1 >> e2 >> e3;
		len.push_back(e1);
		len.push_back(e2);
		len.push_back(e3);
		sort(len.begin(), len.end());
		result.push_back(check(len[0],len[1],len[2]));
	}
	for (int i=0; i<N; ++i){
		if (result[i] == true){
			cout << "YES" << endl;
		}
		else{
			cout << "NO" << endl;
		}
	}
	return 0;
}

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

bool isRightTri(int a,int b,int c);
void swap(int& a,int &b);

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

bool isRightTri(int a,int b,int c){
  if(a>b) swap(a,b);
  if(b>c) swap(b,c);
  if(a*a+b*b-c*c==0) return true;
  return false;
}

void swap(int& a,int &b){
  int tmp;
  tmp=b;
  b=a;
  a=tmp;
}

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

C++: #include <iostream>

int main()
{
    std::cin.tie(0);
    std::ios::sync_with_stdio(false);
    int N, a, b, c;
    std::cin >> N;
    for (int i = 0; i < N; ++i) {
        std::cin >> a >> b >> c;
        if (a * a + b * b == c * c)
            std::cout << "YES" << std::endl;
        else
            std::cout << "NO" << std::endl;
    }
}

C++:  #include <cstdio>

int i,a,b,c;
int main()
{
	scanf("%d",i);
		while(i!=0)
		{
			scanf("%d %d %d",a,b,c);
			
			if(c<a+b&&((a-b)<c&&(b-a)<c))
			{
				printf("YES\n");
			}
			else if(c>=a+b||((a-b)>=c||(b-a)>=c))	
			{
				printf("NO\n");
			}
			i--;
		}

	return 0;
}

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

int main()
{
	int l;
	cin >> l;
	for (int i = 0; i < l; i++) {
		int a, b, c;
		cin >> a >> b >> c;
		if (a*a == b*b + c*c || b*b == a*a + c*c || c*c == b*b + a*a) cout << "Yes" << endl;
		else cout << "No" << endl;
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
int main()
{
    long long int a,b,c,f,t;
    cin>>t;
    while(t--)
    {
        f=0;
        cin>>a>>b>>c;
        if(a>b && a>c)
        {
            if((b*b)+(c*c)==(a*a))
                f=1;
        }
        else if(b>a && b>c)
        {
            if((a*a)+(c*c)==(b*b))
                f=1;
        }
        else if(c>b && c>a)
        {
            if((b*b)+(a*a)==(c*c))
                f=1;
        }
        if(f==1)
            cout<<"YES"<<endl;
        else
            cout<<"NO"<<endl;
    }
}

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <cstdio>
#include <vector>
#include <queue>
#include <set>
#include <numeric>
#include <cmath>

using namespace std;

typedef long long int lld;

const lld mod = 1e9+7;
const lld INF = 1e9;
//const lld MAXN = 1e9;

int main()
{
	int n,a,b,c;

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

		int x,y,z;

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

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


	return 0;
}

C++: #include<stdio.h>

int main(void)
{
	int i;
	int x[1000]={0},y[1000]={0},z[1000]={0},hantei[1000];
	int j=0,e=0;

	while(e==0)
	{
		scanf("%d %d %d",&x[j],&y[j],&z[j]);
		
		if(x[j]<1 || 1000<x[j] || y[j]<1 || 1000<y[j] || z[j]<1 || 1000<z[j])break;

		j=j+1;
	}

	for(i=0;i<j;i++)
	{
		if(y[i]<x[i] && z[i]<x[i])
		{
			if(x[i]*x[i] == y[i]*y[i]+z[i]*z[i])
				hantei[i]=1;
			else
				hantei[i]=0;
		}
		else if(x[i]<y[i] && z[i]<y[i])
		{
			if(y[i]*y[i] == x[i]*x[i]+z[i]*z[i])
				hantei[i]=1;
			else
				hantei[i]=0;
		}
		else
		{
			if(z[i]*z[i] == x[i]*x[i]+y[i]*y[i])
				hantei[i]=1;
			else
				hantei[i]=0;
		}
	}
	for(i=0;i<j;i++)
	  {   
	   switch(hantei[i])
	    {
		   case 0:
			  printf("NO\n");
			  break;
		   case 1:
			  printf("YES\n");
		      break;
		   default:
			   break;
	   }
	}

	return 0;
}

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

int main() {
  int ct = 0;
  vector<int> v(3);

  scanf("%d", &ct);
  for(int i = 0; i < ct; i++) {
    scanf("%d %d %d", &v[0], &v[1], &v[2]);
    sort(v.begin(), v.end());                    
    if(v[2] * v[2] == v[0] * v[0] + v[1] * v[1]) printf("YES\n");
    else printf("NO\n");
    v.clear();
  }
  return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int n,a,b,c,i,l;
	
	scanf("%d",&n);
	for(i=0;i<n;i++){
	l=0;
		scanf("%d %d %d",&a,&b,&c);
	if(a<c&&b<c){
		if(a*a+b*b==c*c){
			printf("YES\n");
			l=1;
		}
	}
	else if(a<b&&c<b){
		if(a*a+c*c==b*b){
			printf("YES\n");
			l=1;
		}
	}
	else if(b<a&&c<a){
		if(c*c+b*b==a*a){
			printf("YES\n");
			l=1;
		}
	}
	else if(l==0){
	printf("NO\n");
	}
	}
	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++){
        if(l>1000){
            break;
        }
        for(k=0;k<3;k++){
            cin>>a[k];
            if(a[k]>1000||a[k]<=0){
                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>
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==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[200][3];
	int len=0,m;
	cin >> m;
	while (cin >> n[len][0] >> n[len][1] >> n[len][2]) {
		n[len][0] *= n[len][0];
		n[len][1] *= n[len][1];
		n[len][2] *= n[len][2];
		len++;
	}
	for (int i = 0; i < len; i++) {
		if (n[i][0] == (n[i][1] + n[i][2]))
			cout << "YES" << endl;
		else if (n[i][1] == (n[i][2] + n[i][0]))
			cout << "YES" << endl;
		else if (n[i][2] == (n[i][0] + n[i][1]))
			cout << "YES" << endl;
		else 
			cout << "NO" << endl;
	}
	return 0;
}