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++: #define _USE_MATH_DEFINES
#include <algorithm>
#include <cstdio>
#include <functional>
#include <iostream>
#include <cfloat>
#include <climits>
#include <cstring>
#include <cmath>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <time.h>
#include <vector>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> i_i;
typedef pair<ll, int> ll_i;
typedef pair<double, int> d_i;
typedef pair<ll, ll> ll_ll;
typedef pair<double, double> d_d;
struct edge { int u, v; ll w; };

ll MOD = 1000000007;
ll _MOD = 1000000009;
double EPS = 1e-10;

int calc(int k) {
	return (ll)k * (k - 1) / 2;
}

int main() {
	int N; cin >> N;
	while (N--) {
		vector<int> v(3);
		cin >> v[0] >> v[1] >> v[2];
		sort(v.begin(), v.end());
		cout << (v[0] * v[0] + v[1] * v[1] == v[2] * v[2] ? "YES" : "NO") << endl;
	}
}

C++: #include <bits/stdc++.h>
using  namespace std;
#define ll    long long int
#define pai     pair<int,int>
#define vi      vector<int>
#define vd      vector<double>
#define mpi     map<int,int>
#define mps     map<string,int>
#define sti     stack<int>
#define stc     stack<char>
#define sei     set<int>
#define ses     set<string>
#define multii  multiset<int>

 int main()
{
  /*#ifndef ONLINE_JUDGE
  freopen("tin.txt","r",stdin);
  freopen("tout.txt","w",stdout);
  #endif*/
  ll t;
  cin>>t;

  while(t--){
  ll a,b,c;
  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;
  }

  }

}

C++: #include<iostream>
#include<vector>
#include<algorithm>

using namespace std;

int power(int a, int n){
  int result = a;
  for(int i = 1; i < n; i++){
    result *= a;
  }
  return result;
}

int main(){
  int n;
  cin >> n;
  vector<bool> result;
  for(int i = 0; i < n; i++){
    vector<int> tri;
    for(int j = 0; j < n; j++){
      int tmp;
      cin >> tmp;
      tri.push_back(tmp);
    }
    sort(tri.begin(),tri.end());
    if(power(tri[0],2) + power(tri[1],2) == power(tri[2],2)){
      result.push_back(true);
    }else{
      result.push_back(false);
    }
  }
  for(int i = 0; i < n; i++){
    if(result[i]){
      cout << "YES\n";
    }else{
      cout << "NO\n";
    }
  }
  return 0;
}

C++: #include<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<string>
#include<algorithm>
#include<vector> 
#include<limits>
#include<numeric>
#include<math.h>
using namespace std;

#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define in(x) cin >> x
#define out(str) cout << str << endl

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

int N;

int main(){
    cin>>N;
    int a[N][3];
    rep(i,N){
        rep(j,3){
            cin>>a[i][j];
        }
    }
    rep(i,N){
        sort(a[i],a[i]+3);
        if(pow(a[i][0],2)+pow(a[i][1],2)==pow(a[i[2],2]){
            out("Yes");
        }
        else{
            out("No");
        }
    }
}

C++: #include <iostream>

using namespace std;

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

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

    int max = 0;
    for (int i = 0; i < 3; i++) {
      max = a[i] > max ? a[i] : max;
    }

    for (int i = 0; i < 3; i++) {
      a[i] = a[i] == max ? 0 : a[i];
    }

    max *max == a[0] * a[0] + a[1] * a[1] + a[2] * a[2] ? cout << "Yes" << endl
                                                        : cout << "No" << endl;
  }

  return 0;
}

C++: #include<stdio.h>
int main(){
int n,a,b,c,t;
scanf("%d",&n);
while(n--){
scnaf("%d %d %d",&a,&b,&c);
if(a<b){t=a;a=b;b=t;}
if(a<c){t=a;a=c;c=t;}
if(a*a==b*b+c*c)printf("Yes\n");
else            printf("No\n);
}
return 0;
}

C++: #include <stdio.h>
#include <algorithm>
using namespace std;
int main(){
int a[3],n;
scanf("%d",&n);
for(int i=0;i<n;i++){
for(int j=0;j<3;j++){
scanf("%d",&a[j]);
}
sort(a,a+3);
if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2])printf("Yes\n");
else printf("No\n");
}
}

C++: #include <iostream>
using namespace std;
bool ok(int a, int b, int c) { return a*a+b*b==c*c; }
int main()
{
    int a, b, c, n;
    cin >> n;
    while (n--) {
        cin >> a >> b >> c;
        if (ok(a, b, c) || ok(b, c, a) || ok(c, a, b)) cout << "YES";
        else cout << "NO";
        cout << endl;
    }
    return 0;
}

C++: #include <cstdio>

long maks(long a, long b, long c);

int main() {
    int t;
    scanf("%d", &t);
    for (;t > -1; t--) {
        long a, b, c;
        scanf("%d %d %d", &a, &b, &c);
        a = a*a;
        b = b*b;
        c = c*c;
        if ( maks(a, b, c) == (a + b + c - maks(a, b, c))) {
             printf("YES\n");
        } else printf("NO\n");
    }
    return 0;
}

long maks(long a, long b, long c) {
     if ((a > b)&&(a > c)) {return a;}
     else if ((b > a)&&(b > c)) {return b;}
     else {return c;}
}

C++: #include<iostream>

using namespace std;
 
int main(){
 
 int tri[1000][3];
 int a,b,c,N;
 
 cin >> N;
 
 for(int i = 0; i < N; i++){
 
  cin >> tri[i][0] >> tri[i][1] >> tri[i][2];
 
  a = tri[i][0]*tri[i][0];
  b = tri[i][1]*tri[i][1];
  c = tri[i][2]*tri[i][2];

 if(a == b+c || b == a+c || c == a + b)
  cout << "YES" << endl;
 else
  cout << "NO" << endl;
 }
 return 0;
}

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

C++: #include <iostream>
#include <algorithm>

int main(){
	using namespace std;
	while(1){
		int n;
		long int a[3] = { 0 };
		cin >> n;
		if(cin.eof() || n == 0) break;
		for(int i = 0;i<n;i++){
			cin >> a[0] >> a[1] >> a[2];
			sort(a,a+3);
			if((a[2]^2) == (a[0]^2)+(a[1]^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;
	for(int i=1;i<=N; i++){
		cin>>a>>b>>c;
		if(a*a+b*b==c*c){
			cout<<"Yes"<<endl;
		}else if(a*a+b*b!=c*c){
			cout<<"No"<<endl;
		}
	}

}

C++: #define _USE_MATH_DEFINES

#include <iostream>
#include <string>
#include <iomanip>
#include <cmath>
#include <algorithm>
#include <utility>
#include <vector>
#include <numeric>

using namespace std;

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

	for (int i = 0; i < n; i++)
	{
		vector<int> a(3);
		for (int j = 0; j < a.size(); j++)
		{
			cin >> a.at(j);
		}
		sort(a.begin(), a.end());

		cout << (a.at(0)*a.at(0) + a.at(1)*a.at(1) == a.at(2)*a.at(2) ? "YES" : "NO") << endl;
	}
}