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++: #include <bits/stdc++.h>
using namespace std;
//#include <boost/multiprecision/cpp_int.hpp>
//using multiInt = boost::multiprecision::cpp_int;

using ll = long long int;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
template<typename Q_temp>
using smaller_queue = priority_queue <Q_temp, vector<Q_temp>, greater<Q_temp> >;

const int INF = (int) 1e9;
const ll LINF = (ll) 4e18;
const ll MOD = (ll) (1e9 + 7);
const double PI = acos(-1.0);
const int limit = 100010;

#define REP(i,m,n) for(ll i = m; i < (ll)(n); ++i)
#define rep(i,n) REP(i, 0, n)
#define MP make_pair
#define MT make_tuple
#define YES(n) cout << ((n) ? "YES" : "NO") << endl
#define Yes(n) cout << ((n) ? "Yes" : "No") << endl
#define Possible(n) cout << ((n) ? "Possible" : "Impossible") << endl
#define all(v) v.begin(), v.end()
#define NP(v) next_permutation(all(v))
#define dbg(x_) cerr << #x_ << ":" << x_ << endl;
#define dbg2(x_) for(auto a_ : x_) cerr << a_ << " "; cerr << endl;
#define dbg3(x_ , sx_) rep(i, sx_) cerr << x_[i] << " "; cerr << endl;
vector<int> Dx = {0, 0, -1, 1, -1, 1, -1, 1, 0};
vector<int> Dy = {1, -1, 0, 0, -1, -1, 1, 1, 0};

inline ll CEIL(ll a, ll b) {
    return (a + b - 1) / b;
}

//------------------------------------------------------

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

    int n;
    cin >> n;
    
    auto check = [](int x, int y, int z) {
        return x * x + y * y == z*z;
    };

    rep(i, n) {
        int a, b, c;
        cin >> a >> b >> c;
        YES(check(a, b, c) || check(b, c, a) || check(c, a, b));
    }
    return 0;
}

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

int main(){
    int n,a,b,c,max;
    bool output[1000]={false};

    std::cin >> n;
    for (int i=0;i<n;++i)
    {
        std::cin >> a >> b >> c;
        if (a>b && a>c){
            max = a;
            a = 0;
        }
        else if (b>a && b>c){
            max= b;
            b = 0;
        }
        else if (c>a && c>b){
            max= c;
            c = 0;
        }
        if (pow(max,2) == pow(a,2)+pow(b,2)+pow(c,2)){
            output[i] = true;
        }
    }
    for (int i=0;i<n;++i){
        if (output[i]) std::cout << "YES" << std::endl;
        else std::cout << "NO" << std::endl;
    }
}

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

int main(){
	int t[1000][3], cnttri=0, cntlen, i;
	string str, tmp;
while(getline(cin, str)){
	cntlen=0;
	istringstream stream(str);
	while(getline(stream, tmp, ' ')){
		if(cntlen > 2){cntlen++;break;};
		t[cnttri][cntlen] = atoi(tmp.c_str());
		cntlen++;
		
	}
	if(cntlen == 3){
		cnttri++;
	}
}
	for(i=0;i<cnttri;i++){
		if(t[i][2]*t[i][2] == t[i][1]*t[i][1] + t[i][0]*t[i][0]){
			cout << "YES\n";
		}else{
			cout << "NO\n";
		}
	}
	return 0;
}

C++: #include <iostream>

using namespace std;



int main() {

    int N;

    cin >> N;

    int a, b, c;

    for (int n = 0; n != N; ++n) {

        cin >> a >> b >> c;

        a*a + b*b == c*c ? cout << "YES" << endl : cout << "NO" << endl;

    }

    return 0;

}

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

int triangle(int a,int b,int c){
    //error check
	if(a<=0 || b<=0 || c<=0){
		cout << "ERROR" << endl;
		return 1;
	}
	if(a < b){
		swap(a,b);
	}
	if(a < c){
		swap(a,c);
	}
	
	if(a*a-b*b-c*c == 0){
		cout << "YES" << endl;
	}
	else{
		cout << "NO" << endl;
	}
	return 0; 
}

int main(void){
    int num,x,y,z;
	cin >> num;
	for(int i=0;i<num;i++){
		cin >> x >> y >> z;
		triangle(x,y,z);
	}
}

C++: #include <iostream>
#include <string>
#include <sstream>


using namespace std;

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

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

bool isRightTriangle(int a, int b, int c) {
    int newc = sqrt(a*a + b*b);
    int newb = sqrt(c*c - a*a);
    int newa = sqrt(c*c - b*b);
    return(a == newa && b == newb && c == newc);
}

int main(void) {
    int num; cin >> num;
    vector<int> vec(num);
    for(int r = 0; r < num; r++) {
        cin >> vec[0] >> vec[1] >> vec[2];
        sort(vec.begin(), vec.end());
        cout << (isRightTriangle(vec[0], vec[1], vec[2]) ? "YES" : "NO") << endl;
    }
    return(0);
}

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

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

    for (int i = 0;i <= times; i++) {
        int a, b, c;
        cin >> a >> b >> c;

        int a2, b2, c2;
        a2 = pow(a,2);
        b2 = pow(b,2);
        c2 = pow(c,2);

        if (a2 == b2 + c2 || b2 == a2 + c2 || c2 == a2 + b2) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }

    return 0;
}

C++: #include <iostream>

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

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

using namespace std;

int main(){
	int a,b,c,n,i;
	cin >> n;
	for( i = 0; i < n; i++ ){
		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;
		}
		
	}
	
	return 0; 
}

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

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

C++: #include <iostream>
int main(void){
	int n,a,b,c;
	std::cin>>n;
	for (;n--;){
		std::cin>>a>>b>>c;
		if (a>b) swap(a,b);
		if (b>c) swap(b,c);
		if (a*a+b*b==c*c)
			std::cout<<"YES\n";
		else
			std::cout<<"NO\n";
	}
}

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

#define PI ( atan2(1,1) * 4)

double trigon_angle(double a, double b, double c){
	double ans;
	ans = (b*b + c*c - a*a) / (2*b*c);
	ans = atan2(sqrt(1-ans * ans),ans);
	return ans* 180 / PI;
}
int main(void) {
	int i,c,n,hen[3];
	double h,a;
	scanf("%d",&n);
	
	for(i = 0; n > i; i++){
		scanf("%d%d%d",&hen[0], &hen[1], &hen[2]);
		for(c = 0; 3 > c; c++){
			a = trigon_angle(hen[c], hen[(c+1)%3], hen[(c+2)%3]);
			if((int)a == 90) {printf("YES\n");break;}
		}
		if(n == c)printf("NO\n");
	}
	return 0;
}