Go: package main

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

func main() {
	n, err := strconv.Atoi(strScan())
	if err != nil {
		fmt.Println("数字を入力して下さい。")
	} else {
		var counter int = n
		var judgeArr []string
		scanner := bufio.NewScanner(os.Stdin)
		for scanner.Scan() {
			strArr := strings.Fields(scanner.Text())
			castNumArr := StringToInt(strArr)
			judgeArr = append(judgeArr, checkTriangle(castNumArr))
			counter--
			if counter == 0 {
				break
			}
		}
		for _, v := range judgeArr {
			fmt.Println(v)
		}
	}
}

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

func StringToInt(s []string) []int {
	var i []int
	for _, v := range s {
		castNum, err := strconv.Atoi(v)
		if err != nil {
			panic(err)
		}
		i = append(i, castNum)
	}
	return i
}

func strScan() (stringInput string) {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	stringInput = scanner.Text()
	return
}

C++: #include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef complex<double> P;
typedef pair<int,int> pii;
#define REP(i,n) for(ll i=0;i<n;++i)
#define REPR(i,n) for(ll i=1;i<n;++i)
#define FOR(i,a,b) for(ll i=a;i<b;++i)

#define DEBUG(x) cout<<#x<<": "<<x<<endl
#define DEBUG_VEC(v) cout<<#v<<":";REP(i,v.size())cout<<" "<<v[i];cout<<endl
#define ALL(a) (a).begin(),(a).end()

#define MOD (ll)(1e9+7)
#define ADD(a,b) a=((a)+(b))%MOD
#define FIX(a) ((a)%MOD+MOD)%MOD

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

C++: #include <stdio.h>
#include <stdlib.h> 
#include <math.h>
int main ()
{
	long a,b,c;
	int n;
	while(scanf("%d",&n)){
		for(int i=0; i<n; i++){
			scanf("%ld %ld %ld",&a,&b,&c);
			if(abs(a*a-b*b)==c*c||a*a+b*b==c*c){
				printf("YES\n");
			}
			else{
				printf("NO\n");
			}
		}
	}
	return 0;
}

C++: #include<stdio.h>


int main(){
	int n,a[3];
	scanf("%d",&n);
	int i,j,k;
	for(k=0;k<n;k++){
		scanf("%d %d %d",&a[0],&a[1],&a[2]);
		for(i=0;i<3;i++){
			a[i]=a[i]*a[i];
		}
		j=0;
		for(i=0;i<3;i++){
			if((j=0)||(a[i%3]-a[(i+1)%3]-a[(i+2)%3]==0)){
				j=1;
			}
		}
		if(j==1){
			printf("YES\n");
		}else{
			printf("NO\n");
		}

	}
	return 0;
}

C++: 
//include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <string>
#include <cstring>
#include <ctime>


using namespace std;

//conversion
//------------------------------------------
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(); }

//math
//-------------------------------------------
template<class T> inline T sqr(T x) { return x*x; }

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;

//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define EXISTch(s,c) ((((s).find_first_of(c)) != std::string::npos)? 1 : 0)//cがあれば1 if(1)
#define SORT(c) sort((c).begin(),(c).end())

//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n)  FOR(i,0,n)
#define loop(n) FOR(i,0,n)
#define rrep(i,a,b) for(int i=(a);i>=(b);--i)
//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI = acos(-1.0);
const int INF = (int)1000000007;
const LL MOD = (LL)1000000007;//10^9+7
const LL INF2 = (LL)100000000000000000;//10^18



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

	for (int i = 0; i < n; i++) {
		vector<int>e(3);
		
		cin >> e[0] >> e[1] >> e[2];

		sort(e.begin(), e.end());

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

C++: #include<iostream>
#include<vector>
#include<algorithm>
int main(){
  using namespace std;
  int N;
  cin >> N;
  for(int i = 0; i < N; i++){
    vector<int> edge(3);
    for(int j = 0; j < 3; j++){
      cin >> edge[j];
    }
    sort(edge.begin(), edge.end());
    int l,m,s;
    s = edge[0];
    m = edge[1];
    l = edge[2];
    if(l*l == m*m + s*s){
      cout << "YES" << endl;
    }else{
      cout << "NO" << endl;
    }
  }
}

C++: #include <iostream>
using namespace std;
int main(){
    int a,b,c,n;
    cin >> n;
    for (;0<n;n--){
        cin >> a >> b >> c;
        if (a^2+b^2!=c^2 && a^2+c^2!=b^2 && b^2+c^2!=a^2)
            cout << "NO" << endl;
        else
            cout << "YES" << endl;
    }
}

C++: #include <bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;i++)
using namespace std;
typedef long long ll;

int main() {
	int a[3];
	int n; cin >> n;
	rep(i,n) {
		cin >> a[0] >> a[1] >> a[2];
		sort(a, a + 3);
		if (a[2] * a[2] == a[0] * a[0] + a[1] * a[1])puts("YES");
		else puts("NO");
	}
	return 0;
}

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

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

C++: #include<stdio.h>

int main(){
 int n,a,b,c,i,aa,bb,cc;

 scanf("%d",&n);
 for(i=0;i<n;i++){
  scanf("%d %d %d",&a,&b,&c);
  aa=a*a;
  bb=b*b;
  cc=c*c;
  if((aa+bb)==cc||
     (cc+bb)==aa||
     (cc+aa)==bb){
   printf("YES\n");
  }else{
   printf("NO\n");
  }
 }
 return 0;
}

C++: #include <iostream>
#include <cstdio> 
#include <cstdlib>
#include <cctype>
#include <cstring>
#include <sstream>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <list>
#include <stack>
#include <queue>
#include <algorithm>
#include <complex>
using namespace std;

typedef pair<int, int> pii;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;

#ifndef typeof
#define typeof __typeof__
#endif // typeof
 
#define all(c) (c).begin(), (c).end()
#define rall(c) (c).rbegin(), (c).rend()
#define tr(c, i) for(typeof((c).begin()) i = (c).begin(); i != (c).end(); i++)
#define rtr(c, i) for(typeof((c).rbegin()) i = (c).rbegin(); i != (c).rend(); i++)
#define repby(i, a, b, step) for(typeof(b) i = (a); i < (b); i += (step))
#define repab(i, a, b) repby(i, (a), (b), 1)
#define rep(i, n) repab(i, 0, (n))
#define pb push_back
#define sz(c) int((c).size())

bool judge(vi &v)
{
  sort(rall(v));

  return v[0]*v[0] == v[1]*v[1] + v[2]*v[2];
}

int main(int argc, char **argv)
{
  int n, x, y, z;
  vi v;

  cin >> n;
  while (n--) {
    cin >> x >> y >> z; 
    v.pb(x);
    v.pb(y);
    v.pb(z);
    cout << (judge(v) ? "YES" : "NO") << endl;
    v.clear();
  }

  return 0;
}