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<stdio.h>
#include<math.h>

int main()
{
	int N;
	scanf("%d", &N);
	int i, a[1000], b[1000], c[1000];
	for (i = 0; i < N; i++)
	{
		scanf("%d %d %d", &a[i], &b[i], &c[i]);
	}
	for (i = 0; i < N; i++)
	{
		float A = a[i], B = b[i], C = c[i];
		float d = fmax(A, B), sm1 = fmin(A, B);
		float biggest = fmax(d, C), sm2 = fmin(d, C);
		if (pow(biggest, 2) == (pow(sm1, 2) + pow(sm2, 2)))printf("YES\n");
		else printf("NO\n");
	}
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
#define all(vec) vec.begin(),vec.end()
typedef long long int ll;
typedef pair<int,int> P;
typedef pair<P,P> PP;
const ll MOD=10000;
const ll INF=1000000000;
const int MAX=100001;
int dx[4]={0,1,0,-1};
int dy[4]={1,0,-1,0};
int main(){
    int a,b,c,n;
    cin>>n;
    while(n){
        cin>>a>>b>>c;
        int a2=a*a;int b2=b*b;int c2=c*c;
        if(a2==b2+c2||b2==a2+c2||c2==a2+b2){
            cout<<"YES"<<endl;
        }else{
            cout<<"NO"<<endl;
        }
        n--;
    }
    return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<vector>
#include<cmath>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define pb push_back
#define mp make_pair
#define it ::iterator
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
const double ESP=1e-10;
using namespace std;
int main(){
  int n;
  cin>>n;
  rep(i,n){
    vector<int>in(3);
    rep(i,3)cin>>in[i];
    sort(all(in));
    string ans;
    if(in[0]*in[0]+in[1]*in[1]==in[2]*in[2])ans="YES";
    else ans="NO";
    cout<<ans<<endl;
  }


}

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

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

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

int main(){
	int n=0,i=0,k=0,a,b;
	int x[100] = {0} ;
	char y[100] ={0} ;

	while(1){
	cin >> n ;

	if(n <= 1000) break ;
	}
	for(i=0;i<3*n;i+=3){

		while(1){

		cin >> x[i] >> x[i+1] >> x[i+2] ;

		if((x[i] >= 1) && x[i] <=1000){
			if((x[i+1] >= 1) && x[i+1] <=1000){
				if((x[i+2] >= 1) && x[i+2] <=1000){
					break;
				}
			}
		}
		}
		if(x[i+1] > x[i]) {
			k = x[i+1];
			x[i+1] = x[i];
			x[i] = k ;
		}
		if(x[i+2] > x[i]) {
			k = x[i+2];
			x[i+2] = x[i];
			x[i] = k ;
		}
		if(x[i+2] > x[i+1]) {
			k = x[i+2];
			x[i+2] = x[i+1];
			x[i+1] = k ;
		}
	}

	for(i=0;i< 3*n; i+=3){
				a = x[i] * x[i] ;
		b = (x[i+1] * x[i+1] ) + (x[i+2] * x[i+2]) ;

		if( a == b) cout << "YES" << endl ;
		if( a != b) cout << "NO" << endl ;

	}

    return 0;
}

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

int main(){
  int hoge,a,b,c,nya,wan;
  cin >> hoge;
  for(int i=0;i<hoge;i++){
    nya = 0;
    cin >> a >> b >> c;
    wan = a;
	if(b*b+c*c==a*a) nya = 1;
	if(b>wan){ wan = b; if(a*a+c*c==b*b) nya = 1;}
    if(c>wan) if(a*a+b*b==c*c) nya = 1;

	if(nya == 1) cout << "YES" << endl;
	else cout << "NO" << endl;
  }
  return 0;
}

C++: #include <stdio.h>

int main(void)
{
	int x, y, z;
	scanf("%d %d %d", &x, &y, &z);
	while (1) {
		if (x > y + z || y > x + z || z > x + y ) {
			break;
		} 
		if (x * x == y * y + z * z || y * y == x * x + z * z || z * z == x * x + y * y) {
			printf("YES\n");
		}else {
			printf("NO\n");
		}
	return 0;
	}
}

C++: #include <stdio.h>
#include <stdbool.h> 

bool judge(int x, int y, int z)
{    
    static bool flag = false;
    if (x * x + y * y == z * z){
        flag = true;
    }  
    return flag;
}


int main(void)
{
    int repeat, a, b, c;
    scanf("%d", &repeat);
    for (int i = 0; i < repeat ; ++i){
        scanf("%d %d %d", &a, &b, &c); 
        bool flag = judge (a, b, c); 
        flag = judge (b, c, a);
        flag = judge (c, a, b);
        if (flag == true){    
            printf("YES\n");
        }else{	
            printf("NO\n");
        }
    }
    return 0;        
}

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

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

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

int main() {
	vector<int> v(3); int n; cin >> n;
	for (int i = 0; i < n; i++) {
		for (int j = 0; j < 3; j++) { cin >> v[j]; v[j] = pow(v[j], 2); }
		sort(v.begin(), v.end());
		if (v[0] + v[1] == v[2]) cout << "YES" << endl;
		else cout << "NO" << endl;
	}
	return 0;
}

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

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

main() {
  int n;
  int d[3];
  cin>>n;
  for(int i=0;i<n;i++) {
    cin>>d[0]>>d[1]>>d[2];
    sort(d,d+3);
    printf("%s\n",d[2]*d[2]==d[0]*d[0]+d[1]*d[1]?"YES":"NO");
  }
}

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

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

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

int main(){
	int N;
	int i=0;
	int hyp=0,cat=0;
	int x=0;
	
	cin >> N;
	int side[N][3];
	
	while(i<N){
		cin >> side[i][0] >> side[i][1] >> side[i][2];
		if(1<=side[i][0] && side[i][0]<= 1000){
			if(1<=side[i][1] && side[i][1]<= 1000){
				if(1<=side[i][2] && side[i][2]<= 1000)
					i++;
			}
		}
	}
	
	for(int j=0; j<i; j++){
		for(int k=0; k<3; k++){
			x = side[j][k]*side[j][k];
			if(hyp <= x){
				cat += hyp;
				hyp = x;
			}
			else
				cat += x;
		}
		if(hyp == cat)
			cout << "Yes\n";
		else
			cout << "No\n";
		hyp=0;
		cat=0;
	}
	
	return 0;
}

C++: #include <algorithm>
#include <sstream>
#include <iostream>
#include <list>
#include <map>
#include <math.h>
#include <stack>
#include <stdio.h>
#include <string>
#include <queue>
#include <vector>
using namespace std;

int main()
{

	double n, a, b, c, x, y, z;
	cin >> n;

	for (int i = 0; i < n; i++) {
		cin >> a >> b >> c;
		if (a >= max(b, c)) {
			z = a; x = b; y = c;
		}
		else if (b >= max(a, c)) {
			z = b; x = a; y = c;
		}
		else if (c >= max(a, b)) {
			z = c; x = a; y = b;
		}

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