Go: package main

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

func main() {
	n, _ := strconv.Atoi(strScan())
	scanner := bufio.NewScanner(os.Stdin)
	for i := 0; i < n; i++ {
		scanner.Scan()
		strArr := strings.Fields(scanner.Text())
		castNumArr := StringToInt(strArr)
		fmt.Println(checkTriangle(castNumArr))
	}
}

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

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++: #define _USE_MATH_DEFINES
#include<iostream>
#include<string>
#include<queue>
#include<cmath>
#include<map>
#include<set>
#include<list>
#include<iomanip>
#include<vector>
#include<random>
#include<functional>
#include<algorithm>
#include<stack>
#include<cstdio>
#include<bitset>
#include<unordered_map>
#include<climits>
#include<fstream>
using namespace std;
///////////////////library zone!!!!!!!!!!!!!!!!!!!!!!!!!!!!
typedef long long ll;
typedef long double ld;
#define all(a) (a).begin(),(a).end()
const ll Mod = 1000000007;
const ll mod = 998244353;
struct H {
	ll x, y;
	bool operator<(const H &b) const {
		if (x != b.x) return x < b.x;
		return y < b.y;
	}
	bool operator>(const H &b) const {
		if (x != b.x) return x > b.x;
		return y > b.y;
	}
	bool operator==(const H &b) const { return x == b.x&&y == b.y; }
	bool operator!=(const H &b) const { return (*this) != b; }
};
struct P {
	ll pos, cost;
	bool operator<(const P &b) const { return cost < b.cost; }
	bool operator>(const P &b) const { return cost > b.cost; }
};
struct B {
	ll to, cost;
};
struct E {
	ll from, to, cost;
	bool operator<(const E &b) const { return cost < b.cost; }
	bool operator>(const E &b) const { return cost > b.cost; }
};
template<typename T, typename U>
void chmin(T &a, U b) {
	if (a > b) a = b;
}
template<typename T, typename U>
void chmax(T &a, U b) {
	if (a < b) a = b;
}
template<typename T>
T max_0(T a) {
	if (a < 0) return 0;
	return a;
}
template<typename T>
T min_0(T a) {
	if (a > 0) return 0;
	return a;
}
ll read() {
	ll u;
	ll k = scanf("%lld", &u);
	return u;
}
ll gcd(ll i, ll j) {
	if (i > j) swap(i, j);
	if (i == 0) return j;
	return gcd(j%i, i);
}
ll mod_pow(ll x, ll n, ll p) {
	ll res = 1;
	while (n > 0) {
		if (n & 1) res = res * x % p;
		x = x * x % p;
		n >>= 1;
	}
	return res;
}//x^n%p
const ll Inf = 3023372036854775807;
const int inf = 1500000000;
#define int long long
//----------------------------------------------------
	int a[3];
	int n;
signed main() {
	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\n";
		}
		else {
			cout << "NO\n";
		}
	}
}

C++: #include<bits/stdc++.h>
using namespace std;
 
signed main(){
 int a;
 int b[3];
 for(int c=0;c<3;c++)scanf("%d",&b[c]);
 sort(b,b+3);
 if(b[0]*b[0]+b[1]*b[1]==b[2]*b[2])printf("YES\n");
 else printf("NO\n");
}

C++: /*http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0003&lang=jp*/

#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main(){
    int n;

    cin>>n;
    for (int i = 0; i < n; ++i) {
        vector<int> lens;
        for (int j = 0; j < 3; ++j) {
            int tmp;
            cin>>tmp;
            lens.push_back(tmp);
        }
        sort(lens.begin(),lens.end(),greater<int>());
        if(pow(lens[0],2)==pow(lens[1],2)+pow(lens[2],2)){
            cout<<"YES"<<endl;
        }else{
            cout<<"NO"<<endl;
        }
    }
    return 0;
}

C++: #include <iostream>

using namespace std;
int loop;
int panjang[1000][3];
int y = 0;
int temp;
int main()
{
 cin >> loop;
for(int x=0;x<loop;x++)
{
        cin >> panjang[x][y] >> panjang[x][y+1] >> panjang[x][y+2];
        if(panjang[x][y]>1000||panjang[x][y]<1||panjang[x][y+1]>1000||panjang[x][y+1]<1||panjang[x][y+2]>1000||panjang[x][y+2]<1)
            return 0;
}
for(int looper= 0;looper<loop;looper++)
{
    for(int looper2 = 0;looper2<5;looper2++)
{
    if((panjang[looper][y])<(panjang[looper][y+1]))
    {
        temp = panjang[looper][y];
        panjang[looper][y]=panjang[looper][y+1];
        panjang[looper][y+1]=temp;
        temp = 0;
            if((panjang[looper][y+1]<(panjang[looper][y+2])))
    {
        temp = panjang[looper][y+1];
        panjang[looper][y+1]=panjang[looper][y+2];
        panjang[looper][y+2]=temp;
        temp = 0;

    }

    }
}
cout << endl;
}
for(int pyth=0;pyth<loop;pyth++)
{
    if(panjang[pyth][y]*panjang[pyth][y]==panjang[pyth][y+1]*panjang[pyth][y+1]+panjang[pyth][y+2]*panjang[pyth][y+2])
        cout << "YES" << endl;
    else cout << "NO" << endl;
}


}

C++: #include<stdio.h>
void temp(int x,int y,int z)
{
int tmp;
if(x<y){tmp=y;y=x;x=tmp;}
if(x<z){tmp=x;x=z;z=tmp;}
if(y<z){tmp=z;z=y;y=tmp;}
}
int main()
{
int x,y,z.n;
scanf("%d",&n);
while(n-->=0)
{
scanf("%d",&x);scanf("%d",&y);scanf("%d",&z);

temp(x,y,z);
if(x*x=y*y+z*z)printf("YES\n");
else printf("NO\n");


}
return 0;
}

C++: #include <iostream>

using namespace std;

int main(void){

  int n;
  int triangle[3];

  cin >> n;

  while(n--){

  for( int i = 0 ; i < 3 ; i++ ){
    cin >> triangle[i]; 
  }

  sort( triangle , triangle + 3 );

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

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

using namespace std;

int main(){
  int a, b, c, a2, b2, c2;
  while(cin>>a>>b>>c){
    a2= a*a;
    b2= b*b;
    c2= c*c;

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

C++: #include <cstdio>

int main() {
	int a,b,c,n;
	scanf("%d",&n);

	for(int i = 0;i < n; i++){
		scanf("%d%d%d",&a,&b,&c);
		if(a^2 + b^2 == c^2 || c^2 + a^2 == b^2 || b^2 + c^ == a^2){
			printf("YES");
		}else {
			printf("NO");
		}
		return 0;
}

C++: #include "StdAfx.h"
#include "AOJ0003.h"
#include <string>
#include <sstream>
#include <iostream>
#include <stack>
#include <queue>
#include <vector>
using namespace std;

vector<string> exinputstring(){
	vector<string> ss;
	string s;
	while(getline(cin,s) ){
		ss.push_back(s);
	}
	
	return ss;
}
vector<int> exinputint(){
	vector<int> ss;
	int d;
	while( !cin.eof() ) {
		cin >>d;
		ss.push_back(d);
	}
	return ss;
}

main(){
	vector<int> inp=exinputint();
	vector<int>::iterator it = inp.begin();
	for (it++;it != inp.end();){
		int a=*it;it++;
		int b=*it;it++;
		int c=*it;it++;
		if ((a>=b&&b>=c&&a*a==b*b+c*c)||
			(b>=a&&b>=c&&b*b==a*a+c*c)||
			(c>=a&&c>=b&&c*c==a*a+b*b)){
				cout<<"YES";}else{cout<<"NO";}

	}
}

C++: #include<stdio.h>
 
void right_triangle(int x, int y, int z);
 
int main(void)
{
    int n;
    scanf("%d", &n);
    int i = 0;
    int x, y, z;
    while (i < n) {
        scanf("%d %d %d", &x, &y, &z);
        right_triangle(x, y, z);
        i++;
    }
    return 0;
}
 
void right_triangle(int x, int y, int z)
{
    int i = x * x;
    int j = y * y;
    int k = z * z;
    if (i == j + k || j == k + i || k == i + j) {
        printf("YES\n");
    } else {
        printf("NO\n");
    }
}

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);
		if(i[0]*i[0]+i[1]*i[1]==i[2]*i[2])
			cout<<"YES\n";
		else
			cout<<"NO\n";

	}
}