Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func nextInt() int {
	scanner.Scan()
	i, e := strconv.Atoi(scanner.Text())
	if e != nil {
		panic(e)
	}
	return i
}
func main() {
	scanner.Split(bufio.ScanWords)
	n := nextInt()
	for i := 0; i < n; i++ {
		a := nextInt()
		b := nextInt()
		c := nextInt()
		if a*a == b*b + c*c || b*b == a*a + c*c || c*c == a*a + b*b {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
		continue
	}
}

C++: //#include"bits/stdc++.h"
#include<iostream>
#include<ostream>
#include<vector>
#include<string>
#include<algorithm>

#define FOR(i,a,b) for (ll i=(a),__last_##i=(b);i<__last_##i;i++)
#define RFOR(i,a,b) for (ll i=(b)-1,__last_##i=(a);i>=__last_##i;i--)
#define REP(i,n) FOR(i,0,n)
#define RREP(i,n) RFOR(i,0,n)
#define __GET_MACRO3(_1, _2, _3, NAME, ...) NAME
#define rep(...) __GET_MACRO3(__VA_ARGS__, FOR, REP)(__VA_ARGS__)
#define rrep(...) __GET_MACRO3(__VA_ARGS__, RFOR, RREP)(__VA_ARGS__)


using namespace std;
using ll = long long;

void solve();

int main() {

   solve();
   return 0;

}

void solve() {

	vector<ll> v(3);
	ll n;

	cin >> n;

	REP(i, n) {
		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] || v[0]*v[0]+v[2]*v[2]==v[1]*v[1] || v[1]*v[1]+v[2]*v[2]==v[0]*v[0]? "YES": "NO") << endl;
	}

}

C++: #include<stdio.h>
int main(){
	int n,k[100]={0};
	int a,b,c;
	int i;
	
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d %d %d",&a,&b,&c);
		if(a*a==b*b+c*c || b*b==a*a+c*c || c*c==b*b+a*a){k[i]=1;}
	}
	for(i=0;i<n;i++){
		if(k[i]==1){printf("YES\n");}
		else{printf("NO\n");}
	}
	return 0;
}

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

int main() {
	int a, b, c, n, i;
	vector<int> A;
	vector<vector<int> > B;
	cin >> n;
		for (i = 0; i < n; i++) {
			cin >> a >> b >> c;
			A.push_back(a);
			A.push_back(b);
			A.push_back(c);
			sort(A.begin(), A.end());
			B.push_back(A);
			A.clear();
		}
		for (i = 0; i < n; i++) {
			if (B[i][2] * B[i][2] == B[i][0] * B[i][0] + B[i][1] * B[i][1]) cout << "YES" << endl;
			else cout << "NO" << endl;
	}
	return 0;
}

C++: #include <iostream> //üoÍ
#include <vector>   //®Izñ

using namespace std;

int main(){
	int n;
	cin >> n;
	for(int k=0;k<n;k++){
		vector<int> vec;
		for(int i=0;i<3;i++){
			int num;
			cin >> num;
			vec.push_back(num);
		}

		
		
		for(int i=0;i<vec.size();i++){
			for(int j=0;j<vec.size()-1;j++){
				if(vec[j] < vec[j+1]){
					int num = vec[j];
					vec[j] = vec[j+1];
					vec[j+1] = num;
				}
			}
		}

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

C++: timel = int(raw_input())
for gomi in xrange(timel):
 a,b,c = map(lambda x: int(x)**2, raw_input().split())
 if a+b==c or b+c==a or c+a==b:
  print "YES"
 else:
  print "NO"

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

int main(){

int i,j,d,n1,n2,n3,k,temp;

   cin >> d;
   while(d <= 1 or d >= 1000){
       cin >> d;
   }

 int l[d][3];
 

//入力
for(i=0; i<d; i++){
   cin >> n1 >> n2 >> n3;
   
   if(n1 >= 1 and n1 <= 1000 and n2 >= 1 and n2 <=1000 and n3 >= 1 and n3 <= 1000){
       l[i][0]=n1;
       l[i][1]=n2;
       l[i][2]=n3;
        for (k = 0; k < 2; k++) {
        for (j = 2; j > k; j--) {
            if (l[j - 1] > l[j]) {  
                temp = l[i][j];  
                l[i][j] = l[i][j - 1];
                l[i][j - 1] = temp;
            }
        }
    }
   }else{
   i--;
   }
}

    
//出力
for (i = 0; i < d; i++) {
    if(l[i][2]*l[i][2] == (l[i][1]*l[i][1]+l[i][0]*l[i][0])){
    cout << "YES\n";
    }else{
    cout << "NO\n";
    }
}

    return 0;
}

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

class Triangle{
public:
Triangle(){
}
void push(int num1,int num2,int num3){
if(num1>=num2){
if(num1>=num3){c=num1;a=num2;b=num3;}
else{c=num3;a=num1;b=num2;}
}
else{
if(num2>=num3){c=num2;a=num1;b=num3;}
else{c=num3;a=num1;b=num2;}
}
};
void checkRight(){
int cs=c*c;
if(cs==a*a+b*b) ans=1;
else ans=0;
};

void print(){
if(ans==0)
cout <<"NO"<< endl;
if(ans==1)
cout <<"YES"<< endl;
}
protected:
int a,b,c;
int ans=10;
}

int main(){
int num,a,b,c;
	Triangle *tri /* = Triangle[1000]*/;
	cin >> num;
	tri = new Triangle[num]/*(a,b,c)*/;
	for(int n=0;n<num;n++){
	cin >> a;
	cin >> b;
	cin >> c;
	tri[n].push(a,b,c);
	}
for(int n=0;n<num;n++){
tri[n].checkRight();
tri[n].print();
}
return 0;
}

C++: #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define shosu(n) setprecision(n)
#define INF 1000000000;
using namespace std;
int main() {
  int N, n[3];
  cin >> N;
  for (int i; i < N; i++) {
    rep(i, 3) cin >> n[i];
    sort(n, n + 3);
    if (n[0] * n[0] + n[1] * n[1] - n[2] * n[2] == 0)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}

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

bool IsRightTriangle(const int a, const int b, const int c)
{
	vector<int> SideLength(3);
	SideLength[0] = a;
	SideLength[1] = b;
	SideLength[2] = c;
	sort(SideLength.begin(), SideLength.end(), greater<int>());
	if(SideLength[0] * SideLength[0] == SideLength[1] * SideLength[1] + SideLength[2] * SideLength[2]){
		return true;
	}else{
		return false;
	}
}

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

C++: #include<bits/stdc++.h>
using namespace std;
int main()
{
    int n,a,b,c;
    cin>>n;
    while(n--)
    {
        cin>>a>>b>>c;
        if((a*a)==(b*b)+(c*c) || (b*b)==(a*a)+(c*c) || (c*c)==(b*b)+(a*a))
        {
            cout<<"YES\n";
        }
        else
            cout<<"NO\n";
    }
    return 0;
}

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

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

C++: #define _CRT_SECURE_NO_WARNINGS
#include <cstdio>
#include <iostream>
#include <vector>
#include <list>
#include <map>
#include<string>
#include <algorithm>
#include <functional>
#include <cmath>
using namespace std;
typedef vector <int> ivector;


int main(){
	int N;
	cin >> N;
	for (int i = 0; i < N; i++){
		int a, b, c;
		cin >> a >> b >> c;
		int ma = max(a, max(b, c));
		int mi = min(a, min(b, c));
		int mid = a + b + c - ma - mi;
		if (pow(ma,2)==pow(mi,2)+pow(mid,2)){
			cout << "YES" << endl;
		}
		else{
			cout << "NO" << endl;
		}
	}
	

	return 0;
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
int main(){
	int n;
	
	cin >> n;
	
	for (int i = 0; i < n; i++){
		int a,b,c;
		cin >> a >> b >> c;

		if (a > c){
			swap (a, c);
		}
		if (b > c){
			swap (b, c);
		}
		if (a * a + b * b == c * c){
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		}
	}
	return 0;
}

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

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

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

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

C++: gets.to_i.times do
  a=gets.split.map(&:to_i).sort
  if a[0]*a[0]+a[1]*a[1]==a[2]*a[2] then puts "YES"
  else puts "NO"
  end
end