Go: package main

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

func main() {
	n, _ := strconv.Atoi(strScan())
	scanner := bufio.NewScanner(os.Stdin)
	for i := 0; i < n; i++ {
		scanner.Scan()
		strArr := strings.Fields(scanner.Text())
		castNumArr := StringToInt(strArr)
		fmt.Println(checkTriangle(castNumArr))
	}
}

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"
	} else {
		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 <bits/stdc++.h>

using namespace std;


#define REP(i,n) for(ll i=0;i<n;++i)
#define RREP(i,n) for(ll i=n-1;i>=0;--i)
#define FOR(i,m,n) for(ll i=m;i<n;++i)
#define RFOR(i,m,n) for(ll i=n-1;i>=m;--i)
#define ALL(v) (v).begin(),v).end()

#define PB(a) push_back(a)
#define MOD 1000000007

typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> VI;
typedef vector<VI> VVI;
const double PI = 3.14159265358979323846;
const double EPS = 1e-12;
const int INF = numeric_limits<int>::max() / 2;
const int NEG_INF = numeric_limits<int>::min() / 2;

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);

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

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

C++: #include<stdio.h>
#include<math.h>
void hidariokiku(int *hidari, int *migi);
//this file is not a C file but a C++ file                                      

int main(void){
    int inpnum;//最初の数字の記憶                                               
    int a,b,c;//辺の長さを記憶                                                  

    for(scanf("%d", &inpnum); inpnum != 0; inpnum -= 1) {
        scanf(" %d %d %d", &a, &b, &c);
        //a > b > cの形に持っていく                                             
        hidariokiku(&a, &b);
        hidariokiku(&b, &c);
        hidariokiku(&a, &b);
        //判定                                                                  
        if(pow(a, 2) == pow(b, 2) + pow(c, 2)) {
            printf("YES\n");
        }else{
            printf("NO\n");
        }
    }
    return 0;
}

void hidariokiku(int *hidari, int *migi) {
  int space;
    if(*hidari < *migi) {
        space = *hidari;
        *hidari = *migi;
        *migi = space;
    }
}

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

C++: #include<stdio.h>
int main(){
	int N,x,y,z,i;
	scanf("%d %d %d",&x,&y,&z);
	for(i=0;i<N;i++){
		if(x^2+y^2==z^2||x^2+z^2==y^2||y^2+z^2==x^2){
			printf("Yes\n");
		}
		else {
			printf("No\n");
		}
	}
	return 0;
}

C++: import sys

N = (int)(raw_input())
a = [0,0,0]

for i in range(N):
    a[0],a[1],a[2] = map(int,raw_input().split())
    a.sort()
    if a[0]^2 + a[1]^2 == a[2]^2:
	print("YES")
    else:
	print("NO")

C++: #include <vector>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
#include <utility>
#include <functional>
#include <sstream>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <climits>
using namespace std;
inline int toInt(string s) { int v; istringstream sin(s); sin >> v; return v;}
template<class T> inline string toString(T x) { ostringstream sout; sout << x; return sout.str();}
typedef vector<int> vi;
typedef vector<vi>  vvi;
typedef vector<string> vs;
typedef pair<int, int> pii;
typedef long long ll;
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define EACH(t,i,c) for(t::iretator i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define FOR(i,a,b) for(int i=(a);i<=(b);++i)
#define REP(i,n) FOR(i,0,n-1)
const double EPS = 1e-10;
const double PI = acos(-1.0);

int main() {
	int n;
	cin >> n;

	REP(i, n) {
		vi hen(3);
		cin >> hen[0] >> hen[1] >> hen[2];
		sort(RALL(hen));

		if(hen[0]*hen[0] == hen[1]*hen[1] + hen[2]*hen[2]) {
			cout << "YES" << endl;
		} else {
			cout << "NO" << endl;
		}
	}

	return 0;
}

C++: #include <iostream>

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

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

    std::cin >> n;
    for (int i = 0; i < n; ++i) {
        std::cin >> a >> b >> c;
        if (is_right_triangle(a, b, c)) {
            std::cout << "Yes" << std::endl;
        } else {
            std::cout << "No" << std::endl;
        }
    }

    return 0;
}

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

#define rep(i,n) for(int i=0;i<n;i++)
#define REP(i,s,n) for(int i=(s);i<=(n);i++)
#define repr(i,n) for(int i=n-1;i>=0;i--)
#define REPR(i,s,n) for(int i=(s);i>=(n);i--)
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin(),(a).rend()
#define Eunique(v) v.erase(unique(all(v)),v.end())
#define Eback(s) s.erase(s.end()-1,s.end())
#define rev(v) reverse(all(v))
#define minvec(v) *min_element(all(v))
#define maxvec(v) *max_element(all(v))
#define sumvec(v) accumulate(all(v),0LL)
#define mapmin(v) v.rbegin()->first
#define mapmax(v) v.begin()->first
#define pb push_back
#define pf push_front
#define m_p make_pair
#define DOUBLE fixed << setprecision(15)
#define OK cerr<<"OK\n"
#define OK1 cerr<<"OK1\n"
#define OK2 cerr<<"OK2\n"
#define SIZE(s) (int)s.size()
#define INF ((1LL<<62)-(1LL<<31))
#define zero(x,n) setw(x) << setfill('0') << n
#define endl '\n'

typedef long long ll;

typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<long long> vll;
typedef vector<vll> vvll;
typedef vector<double> vd;
typedef vector<vd> vvd;
typedef vector<char> vc;
typedef vector<vc> vvc;
typedef vector<bool> vb;
typedef vector<vb> vvb;
typedef vector<string> vs;

typedef pair<ll,ll> pll;
typedef pair<int,int> pii;
typedef vector<pair<int,int>> vpii;
typedef vector<pair<ll,ll>> vpll;

const double pi = acos(-1.0);
const ll mod=1000000007;
const ll mod2=998244353;

template<class A, class B>
ostream& operator<<(ostream& ost, const pair<A, B>&p) {
	ost << "{" << p.first << ", " << p.second << "} ";
	return ost;
}

template<class T>
ostream& operator<<(ostream& ost, const vector<T>&v) {
	ost << "{";
	for (int i = 0; i<(int)v.size(); i++) {
		if (i)ost << " ";
		ost << v[i];
	}
	ost << "} \n";
	return ost;
}

template<class A, class B>
ostream& operator<<(ostream& ost, const map<A, B>&v) {
	ost << "{";
	for (auto p:v) {
		ost << "{" << p.first << ", " << p.second << "} ";
	}
	ost << "} ";
	return ost;
}

template<class T>
inline bool chmax(T& a, T b){if(a<b){a=b;return true;} return false;}

template<class T>
inline bool chmin(T& a, T b){if(a>b){a=b;return true;} return false;}

void YES(bool b) {cout << ((b)?"YES\n":"NO\n");}
void Yes(bool b) {cout << ((b)?"Yes\n":"No\n");}
void yes(bool b) {cout << ((b)?"yes\n":"no\n");}
void Yay(bool b) {cout << ((b)?"Yay!\n":":(\n");}

ll powmod(ll a,ll b){ll c=1; while(b>0){ if(b&1){ c=a*c%mod; } a=a*a%mod; b>>=1; } return c;}
ll nCrmod(ll n,ll r){ll x=1,y=1; rep(i,r){x=x*(n-i)%mod; y=y*(i+1)%mod;} return x*powmod(y,mod-2)%mod;}
ll gcd(ll x, ll y) {return __gcd(x,y);}
ll lcm(ll x, ll y) {return x/__gcd(x,y)*y;}

int main()
{
	ll n;
	cin >> n;
	vs ans(n);
	rep(i,n){
		vll a(3);
		rep(j,3) cin >> a[j];
		sort(all(a));
		if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2]) ans[i]="YES";
		else ans[i]="NO";
	}
	for(auto&& e:ans) cout << e << endl;
	return 0;
}