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 <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 (N == 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 <stdio.h>

void right_triangle(int x, int y, int z)
{
    if ((x * x + y * y == z * z) || (x * x + z * z == y * y) || (y * y + z * z == x * x)) {
        printf("YES\n");
    } else {
        printf("NO\n");
    }
}

int main(void)
{
    int n, x, y, z;
    scanf("%d", &n);
    for (int i = 0; i < n; ++i) {
        scanf("%x %y %z", &x, &y, &z);
        right_triangle(x, y, z);
    }
    return 0;
}

C++: #include <cstdio>

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

    scanf("%d", &n);
    for (int i = 0; i < n; i++) {
        scanf("%d %d %d", &a, &b, &c);

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

    return 0;
}

C++: #include<iostream>

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

	return 0;
}

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

int main() {
	int n,d[3];
	cin>>n;
	for(int i=0; i<n; i++){
		cin>>d[0]>>d[1]>>d[2];
		sort(d,d+3);
		if(d[0]*d[0]+d[1]*d[1] == d[2]*d[2]){
			cout<<"YES"<<endl;
		}else{
			cout<<"NO"<<endl;
		}
	}
	return 0;
}

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;
}