Go: package main

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

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)
		fmt.Fprintln(out, checkTriangle(data))
	}
}

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
}

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"
	}
	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<iostream>
#include<algorithm>
#include<math.h>

int listen_dataCount();

class triangle
{
private:
	int longestLine;
	int line[2];
public:
	triangle();
	void is_rightTriangle();
};

triangle::triangle()
{
	using namespace std;
	int inputs[3];
	cin>>inputs[0]>>inputs[1]>>inputs[2];
	
	sort(inputs,inputs+3);
	
	this->longestLine=inputs[2];
	
	for(int roop=0;roop<2;roop++)
	{
		this->line[roop]=inputs[roop];
	}
}

void triangle::is_rightTriangle()
{
	using namespace std;
	if(pow(this->longestLine,2)==pow(this->line[0],2)+pow(this->line[1],2))
	{
		cout<<"YES"<<endl;
	}
	else
	{
		cout<<"NO"<<endl;
	}
}

int main()
{
	int datacount=listen_dataCount();
	for(int roop=0;roop<datacount;roop++)
	{
		triangle tr=triangle();
		tr.is_rightTriangle();
	}
	
	return 0;
}

int listen_dataCount()
{
	using namespace std;
	
	int count;
	cin>>count;
	
	return count;
}

C++: //
//  main.cpp
//  b
//
//  Created by h3037178 on 2017/07/31.
//  Copyright ?? 2017??´ ?????£?????????. All rights reserved.
//

#include <iostream>
#include<algorithm>
#include<math.h>
using namespace std;
int main(){
    int n,a,i[3],f[3];
    cin>>n;
    for(int l=0;l<n;l++){
        for(a=0;a<3;a++){
            cin>>i[a];
            if(i[a]<=0){
                break;
            }
            f[a]=i[a]^2;
        }
        sort(f,f+3);
        if(f[2]==f[0]+f[1]){
            cout<<"YES"<<endl;
        }else{
            cout<<"NO"<<endl;
        }
    }
}

C++: #include <bits/stdc++.h>
using namespace std;
#define FOR(i, s, n) for(int i = s; i < (int)n; i++)
#define per(i, n) for(int i = n; i >= 0; i--)
#define ROF(i, s, n) for(int i = s; i >= (int)n; i--)
#define FORIT(i, A) for (auto i : A)
#define PRINT(x) cout << (x) << "\n"
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define MP make_pair
#define EACH(i, n) for (__typeof((n).begin()) i = (n).begin(); i != (n).end(); ++i)
#define SZ(a) int((a).size())
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define CLR(a) memset((a), 0 ,sizeof(a))
#define NCLR(a) memset((a), -1 ,sizeof(a))
#define dump(x) cout << #x << " = " << (x) << "\n";
#define debug(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << "\n";
#define sq(n) (n) * (n)
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
typedef vector<LL> VLL;
typedef vector<VLL> VVLL;
typedef unsigned int uint;
typedef unsigned long long ull;
typedef priority_queue<int> maxpq;
typedef priority_queue< int, vector<int>, greater<int> > minpq;
typedef complex<double> P;
static const double EPS = 1e-10;
static const double PI = acos( -1.0 );
static const int mod = 1000000007;
static const int INF = 1 << 29;
static const LL LL_INF = 1152921504606846976;
static const int dx[] = { -1, 0, 1, 0, 1, -1, 1, -1 };
static const int dy[] = { 0, -1, 0, 1, 1, 1, -1, -1 };


int main() {
	int n, d[3];
	scanf( "%d", &n );
	while ( n-- ) {
		for ( int i = 0; i < 3; i++ ) {
			scanf( "%d", &d[ i ] );
		}
		sort( d, d + 3 );
		printf( "%s\n", sq( d[ 0 ] ) + sq( d[ 1 ] ) == sq( d[ 2 ] ) ? "YES" : "NO" );
	}
	return 0;
}

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

int pow2(int i) {
	return std::pow(i, (double) 2);
}

int main() {
	int in[3];
	while (std::cin >> in[0] >> in[1] >> in[2]) {
		std::sort(in, in + 3);
		if (pow2(in[2]) == pow2(in[0]) + pow2(in[1]))
			std::cout << "YES" << std::endl;
		else
			std::cout << "NO" << std::endl;
	}
}

C++: main(a,b,c){for(;~scanf("%d%d%d",&a,&b,&c);puts((a+b-c&&a+c-b&&c+b-a)?"NO":"YES")a*=a,b*=b,c*=c;}

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;
        if(a*a == b*b+c*c || b*b == a*a+c*c || c*c == a*a+b*b){
            cout << "YES\n";
        } else{
            cout << "NO\n";
        }
    }
    return 0;
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
int main(){
int N;
cin >> N;
while(N--){
int i[3],c;
int max;
cin >> i[0] >> i[1] >> i[2];
sort(i,i+3);
cout << ((i[0]*i[0]+i[1]*i[1]==i[2]*i[2])?"YES\n":"NO\n";
}}

C++: #include<stdio.h>
??
int main(void){
????????????????int a,b,c,temp;
????????????????int i,j;
????????????????int N;
??
????????????????scanf("%d",&N);
??
????????????????int k[N][3];
??
????????????????i=0;
??
????????????????while(scanf("%d %d %d",&a,&b,&c)!=EOF){
????????????????????????????????if(a>b){
????????????????????????????????temp=b;
????????????????????????????????b=a;
????????????????????????????????a=temp;
????????????????????????????????}
????????????????????????????????if(b>c){
????????????????????????????????temp=c;
????????????????????????????????c=b;
????????????????????????????????b=temp;
????????????????????????????????}
??
????????????????????????????????k[i][0]=a;
????????????????????????????????k[i][1]=b;
????????????????????????????????k[i][2]=c;
????????????????????????????????i++;
????????????????????????????????if(N==i) break;
??
????????????????}
??
????????????????for(j=0;j<N;j++){
????????????????????????????????if(k[j][2]*k[j][2]==k[j][1]*k[j][1]+k[j][0]*k[j][0]){
????????????????????????????????printf("YES \n");
????????????????????????????????}else{
????????????????????????????????printf("NO \n");
????????????????????????????????}
????????????????}
??
????????????????return 0;
}

C++: #define _USE_MATH_DEFINES
#include <cmath>

#include <iostream>
#include <string>

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>
using namespace std;

int main(int argc, char *argv[]){
    int N,a,b,c;
	cin >> N;
	for (int i = 0; i < N; ++i){
		cin >> a >> b >> c;
		cout << (((a*a+b*b==c*c) || ((a*a+c*c==b*b) || (c*c+b*b==a*a))) ? "YES":"NO") << endl;
	}
    return 0;
}

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

C++: #include <iostream>
#include <math.h>
using namespace std;
int main(){
    int n , a , b , c ;
    cin >> n ;
    for( int i=0 ; i<n ; i++ ){
        cin >> a >> b >> c;
        a = a*a;
        b = b*b;
        c = c*c;
        int ab=a+b;
        int ac=a+c;
        int bc=b+c;
        if( ab == c ){
            cout << "YES" << endl;
        }
        else if( ac == b ){
            cout << "YES" << endl;
        }
        else if( bc == a ){
            cout << "YES" << endl;
        }
        else
            cout << "NO" << endl;
    }
}