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++: //↓template↓

#include "bits/stdc++.h"
using namespace std;
#define Would
#define you
#define all(n)  n.begin(),n.end()
const long long INF = 1e18;
const long long MOD = 1e9 + 7;
const double pi = acos(-1);
const int SIZE = 1 << 17;
int dx[] = { 1,0,-1,0 }, dy[] = { 0,1,0,-1 }, alp[30];
long long fac[200005], finv[200005], inv[200005];
vector<long long>dij;
struct edge { long long to, cost; };
vector<vector<edge> >G;

long long mod_pow(long long a, long long b) {
	long long res = 1, mul = a;
	for (int i = 0; i < 31; ++i) {
		if (b >> i & 1) {
			res *= mul;
			res %= MOD;
		}
		mul = (mul * mul) % MOD;
	}

	return res;
}

void addedge(int from, int to, int cost) {
	G[from].push_back({ to,cost });
	G[to].push_back({ from,cost });
}

//↑template↑


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

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

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

	while (n--)
	{
		int a, b, c;
		cin >> a >> b >> c;
		//a???????????§????????????????????\?????????
		if (a < b) swap(a, b);
		if (a < c) swap(a, c);
		//??????????????????????????????
		if (a*a == b*b + c*c)
		{
			cout << "Yes" << endl;
		}
		else
		{
			cout << "No" << endl;
		}
	}

	return 0;
}

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

bool Pythagoras_checker(int side[3])
{
    int temp;
    
    for (int i = 0; i < 2; i++) {   //sort
        for (int j = 2; j > i; j--) {
            if (side[i] > side[j]) {
                temp = side[j];
                side[j] = side[i];
                side[i] = temp;
            }
        }
    }
    
    if (side[0] * side[0] + side[1] * side[1] == side[2] * side[2]) {
        return true;
    } else {
        return false;
    }
}

int main(void)
{
    int a;
    int side[3];

    scanf("%d", &a);
    
    for (int i = 0; i < a; i++) {
        for (int j = 0; j < 3; j++) {
            scanf("%d", &side[j]);
        }
        
        if (Pythagoras_checker(side) == true) {
            printf("YES\n");
        } else {
            printf("NO\n");
        }
    }

    return 0;
}

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

using namespace std;

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

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

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

C++: #include<iostream>
#include<math.h>
#include<algorithm>
using namespace std;
int main(){
    int n,a[3],b[3],c,i[3],f[3],j,max,l,k,gou=0,gou2;
    float opi=4;
    cin>>n;
    for(l=0;l<n;l++){
        for(k=0;k<3;k++){
            cin>>a[k];
            if(a[k]>1000||a[k]<=0||n>1000){
                break;
            }
            b[k]=a[k]^2;
        }
        sort(b,b+3);
        if(b[2]==b[0]+b[1]){
            cout<<"YES"<<endl;
        }
        else{
            cout<<"NO"<<endl;
        }
    }
}

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

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

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

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

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

	}
	return 0;
}

C++: #include <iostream>

using namespace std;

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

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

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

using namespace std;

typedef long long ll;
typedef pair<ll, ll> P;

#define MOD 1000000007
#define REP(i, N) for (int i = 0; i < N; ++i)
#define REP1(i, N) for (int i = 1; i <= N; ++i)
#define RREP(i, N) for (int i = N - 1; i >= 0; --i)
#define ALL(a) a.begin(), a.end()

int main() {
  int n;
  cin >> n;
  REP(i, n) {
    int a, b, c;
    cin >> a >> b >> c;
    string ans = "NO";
    if (a * a == (c * c - b * b)) ans = "YES";
    if (b * b == (a * a - c * c)) ans = "YES";
    if (c * c == (b * b - a * a)) ans = "YES";
    cout << ans << endl;
  }
  return 0;
}

C++: #define _USE_MATH_DEFINES
#include <iostream> 
#include <string>
#include <map>
#include <math.h>
#include <vector>
#include <algorithm>
using namespace std; 
int main(){
	int N;
	for(int i=0;i<N;i++){
		int a, b, c;
		cin >> a >> b >> c;
		if(a+b <= c || a+c <= b || b+c <= a){
			cout << "NO" << endl;
		}
		else{
			cout << "YES" << endl;
		}
	}
	return 0;
}

C++: #include <iostream>
#include <math.h>
#include <algorithm>

using namespace std;


int main(){
    int input[3];
    int N;
    
    cin>>N;
    
    for(int i=0;i<N;i++){
        cin>>input[0]>>input[1]>>input[2];
        sort(input,input+3);
        cout<<((input[2]==sqrt(pow(input[1],2)+pow(input[0],2)))?"YES":"NO")<<endl;
    }
    return 0;
}

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

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

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

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

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

int main() {
	int x;
	vector<string> v;
	
	cin >> x;

	for(int i = 0; i < x; i++) {
		int data[3];
		for(int j = 0; j < 3; j++)
			cin >> data[j];
		sort(data, data + 3);

		if(data[2]*data[2] == data[0]*data[0] + data[1]*data[1]) {
			v.push_back("YES");
		} else {
			v.push_back("NO");
		}
	}

	for(int i = 0; i < v.size(); i++) {
		cout << v[i] << endl;
	}

	return 0;
}