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 a,b,c,N;
    
  cin >> N;
  bool count[N];
  for(int i=0;i<N;i++){
    cin >> a >> b >> c;
    if(a*a==b*b+c*c || b*b==a*a+b*b || c*c==a*a+b*b){
      count[i]=true;}
  }
  for(int i=0;i<N;i++){
    if(count[i]==true){
      cout << "YES" << endl;}

    else if(count[i]==false){
      cout << "NO" << endl;}
  }
 
  return 0;
}

C++: #include <stdio.h>

int main(void)
{
	int l[3];
	int i;
	int n;
	
	scanf("%d", &n);
	while (n){
		for (i = 0; i < 3; i++){
			scanf("%d", &l[i]);
		}
		
		if (l[0] > l[2]){
			l[0] += l[2];
			l[2] = l[0] - l[2];
			l[0] -= l[2];
		}
		if (l[1] > l[2]){
			l[1] += l[2];
			l[2] = l[1] - l[2];
			l[1] -= l[2];
		}
		
		if (l[0] * l[0] + l[1] * l[1] == l[2] * l[2]){
			printf("YES\n");
		}
		else {
			printf("NO\n");
		}
		n--;
	}
	
	return (0);
}

C++: #include<iostream>

using namespace std;

int aa(int x, int y, int z) {

	return (((x ^ 2) + (y ^ 2) == (z ^ 2)) || ((x ^ 2) + (z ^ 2) == (y ^ 2)) || ((y ^ 2) + (z ^ 2) == (x ^ 2)));
}

int main() {

	int a, b[1000], c[1000], d[1000];
	bool e[1000];

	cin >> a;

	for (int i = 1; i <= a; i++)
	{
		cin >> b[i] >> c[i] >> d[i];

		e[i] = aa(b[i], c[i], d[i]);

	}

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

		cout << ((e[i] != 0) ? "yes" : "no") << endl;
	}

	return 0;
}

C++: #include <string>
#include <algorithm>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <memory>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <utility>
#include <vector>


using namespace std;

string tri(int a, int b, int c){
	if(a + b >= c && a - b <= c)return true;
	return false;
}

int main(void) {
	int len, a, b, c;
	cin >> len;
	for(int i = 0; i < len; i++){
		cin >> a >> b >> c;
		cout << tri(a, b, c) << endl;
	}
}

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

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

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

C++: // clang-format off
#include <bits/stdc++.h>
#define int long long
#define main signed main()
// #define main int main()
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define prec(n) fixed << setprecision(n)
#define stlice(from, to) substr(from, (to) - (from) + 1)
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
using namespace std;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<double> vd;
typedef vector<char> vc;
typedef vector<bool> vb;
typedef vector<string> vs;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vb> vvb;
typedef vector<vpii> vvpii;
const int INF = sizeof(int) == sizeof(long long) ? 1000000000000000000LL : 1000000000;
const int MOD = 1000000007;
const double PI = acos(-1);
template<typename A, typename B> bool cmin(A &a, const B &b) { return a > b ? (a = b, true) : false; }
template<typename A, typename B> bool cmax(A &a, const B &b) { return a < b ? (a = b, true) : false; }
bool odd(const int &n) { return n & 1; }
bool even(const int &n) { return !odd(n); }
template<typename V> typename V::value_type sum(const V &v) { return accumulate(all(v), 0); }
void solve();
main { solve(); return 0; }
// clang-format on

bool f(int a, int b, int c) {
  return a * a + b * b == c * c;
}

void solve() {
  int n;
  cin >> n;
  rep(_, n) {
    int a, b, c;
    cin >> a >> b >> c;
    cout << (f(a, b, c) || f(b, c, a) || f(c, a, b) ? "YES" : "NO") << endl;
  }
}

C++: #include <iostream>

int main() {
	int N;
	std::cin >> N;

	for( int i=0; i<N; ++i ) {
		int a=0, b=0, c=0;
		std::cin >> a >> b >> c;
		std::cout << (( a*a + b*b == c*c )?"YES":"NO") << std::endl; 
	}
}

C++: int main(void)
{
	int a,b,c,i,k;
	int sort[3];
	int num;
	int max,mid,min;
	int d=1,n=3;
	num<=1000;
	
	scanf("%d",&num);
	
	
    while(d<=num){
		scanf("%d %d %d",&sort[0],&sort[1],&sort[2]);
		for(n=3;n<=1;n--){
			for(i=0;i<=n-1;i++){
				if(sort[i]>sort[i+1]){
						k=sort[i];
						sort[i]=sort[i+1];
						sort[i+1]=k;
					}
			}
		}
		max=sort[2];
		mid=sort[1];
		min=sort[0];
		if(max*max==mid*mid+min*min){
			printf("YES\n");
		}else{
			printf("NO\n");
		}
		d++;
	}
	return 0;
}

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

using namespace std;

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

C++: #include <cstdio>
#include <iostream>
#include <cstring>

using namespace std;

int main()
{
    int a,b,c,d,e,n;
   cin >> n;
   while(n--)
   {
             cin >> a >> b >> c;
             if(c > b && c > a )
             {
               d= (a*a) + (b * b);
               e = (c*c);
             }
             else if( b > c && b > a )
             {
                  d = (a * a) + (c *c);
                  e = (b*b);
                  
             }
             else if(a > c && a > b)
             {
                  d = (b* b) + (c*c);
                  e = (a*a);
             }
             else{
                   d= (a*a) + (b * b);
               e = (c*c);
                  
                  }
             
             if( d == e)
             {
                 cout << "YES\n" ;
                 
             }
             else 
             {
                  cout << "NO\n";
             }
   }
    return 0;
}

C++: #include <stdio.h>

int hantei(int l1,int l2,int l3);
//??´?§?????§???¢??????????????????????????????????????????

int main(void)
{
	int kaisuu, l1, l2, l3;
	int kekka[1000];
	scanf("%d", &kaisuu);
	for(int i = 0; i < kaisuu; i++) {
		scanf("%d %d %d", &l1, &l2, &l3);
		kekka[i] = hantei(l1, l2, l3);
	}
	for(int i = 0; i < kaisuu; i++) {
		if(kekka[i] == 1) {
		 	printf("YES\n");
		}else{
			printf("NO\n");
		}
	}
	return 0;
}

int hantei(int l1,int l2,int l3)
{
	int llong, lshort1, lshort2;
	if(l1 <= l2) {
		lshort1 = l1 * l1;
		if(l2 <= l3) {
			lshort2 = l2 * l2;
			llong = l3 * l3;
		}else{
			lshort2 = l3 * l3;
			llong = l2 * l2;
		}
	}else{
		lshort1 = l2 * l2;
		if(l1 <= l3) {
			lshort2 = l1 * l1;
			llong = l3 * l3;
		}else{
			lshort2 = l3 * l3;
			llong = l1 * l1;
		}
	}
	if(lshort1+ lshort2 == llong) {
		return 1;
	}else{
		return 0;
	}
}