Go: package main

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

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	n, _ := strconv.Atoi(scanner.Text())
	num := int(n)
	var strs []string
	var a, b, c int
	var res string
	var YES string = "YES"
	var NO string = "NO"
	for i := 0; i < num; i++ {
		scanner.Scan()
		strs = strings.Split(scanner.Text(), " ")
		a, _ = strconv.Atoi(strs[0])
		b, _ = strconv.Atoi(strs[1])
		c, _ = strconv.Atoi(strs[2])

		res = NO
		if c*c == (a*a+b*b) || b*b == (a*a+c*c) || a*a == (b*b+c*c) {
			res = YES
		}
		fmt.Printf("%s\n", res)
	}
}

C++: #include<bits/stdc++.h>
#define rep(i,n) for(ll i=0;i<n;++i)
#define rrep(i,n) for(int i=n-1;i>=0;--i)
#define yesno(flg) if(flg){cout<<"YES"<<endl;}else{cout<<"NO"<<endl;}
#define MAX_N 1002
#define i197 1000000007
#define Vi vector<int>
#define Vl vector<long long>
#define pb(a) push_back(a)

using namespace std;

typedef long long ll;
typedef pair<ll,ll> P1;
typedef pair<int,int> Pi;
typedef pair<double,Pi> Pdi;
typedef pair<ll,int>Pli;
typedef pair<P1,ll> P2;
const ll INF=100000000001;
int dy[]={0, 0, 1, -1};
int dx[]={1, -1, 0, 0};
struct Road{double cost;int a,b;};
struct edge{int to,cost;};
struct pos{
	int x,y,cost;
};
int main() {

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

	return 0;
}

C++: //
//  main.cpp
//  Sample
//
//  Created by h3037183 on 2017/07/31.
//  Copyright ?? 2017??´ ?°????. All rights reserved.
//

#include <iostream>
using namespace std;
int main(){
    int a,b,c;
    for(;;){
        cin>>a>>b>>c;
    }
    if((a*a)+(b*b)==(c*c)){
        cout<<"YES";
    }else if((a*a)+(b*b)!=(c*c)){
        cout<<"NO";
    }else if((a*a)+(c*c)==(b*b)){
        cout<<"YES";
    }else if((a*a)+(c*c)!=(b*b)){
        cout<<"NO";
    }else if((c*c)+(b*b)==(a*a)){
        cout<<"YES";
    }else if((c*c)+(b*b)!=(a*a)){
        cout<<"NO";
    }

    return 0;
}

C++: #include <iostream>

using namespace std;

int main()
{
	int n, n1, n2, n3;
	int i = 1;
	cin >> n;
	do{
		cin >> n1 >> n2 >> n3;
		
		if(n1 * n1 + n2 * n2 == n3 * n3){
			cout << "YES" << endl;
		}
		else if(n1 * n1 + n3 * n3 == n2 * n2){
			cout << "YES" << endl;
		}
		else if(n3 * n3 + n2 * n2 == n1 * n1){
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
		i++;
	}while(i <= n);
	
	return 0;
}

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

#define FOR(i,l,r) for(int i = (l);i < (r);i++)
#define ALL(x) (x).begin(),(x).end()
template<typename T> bool chmax(T& a,const T& b){return a < b ? (a = b,true) : false;}
template<typename T> bool chmin(T& a,const T& b){return b < a ? (a = b,true) : false;}
typedef long long ll;

int N;

int main()
{
	scanf("%d",&N);
	vector< vector<int> > A(N,vector<int>(3));
	FOR(i,0,N){
		int A [3];
		scanf("%d%d%d",&A [0],&A [1],&A [2]);
		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 <string>
#include <vector>
#include <sstream>
using namespace std;
void swap(int idx1, int idx2, int *node)
{
	int f = node[idx1];
	node[idx1] = node[idx2];
	node[idx2] = f;
}
//nlogn
void quickSort(int left, int right, int *node)
{
	int pl = left;
	int pr = right;
	int pivot_f = node[(pl + pr) / 2];
	do
	{
		while (node[pl] < pivot_f)
		{
			pl++;
		}
		while (node[pr]> pivot_f)
		{
			pr--;
		}
		if (pl <= pr)
		{
			swap(pl++, pr--, node);
		}
	} while (pl <= pr);
	if (left < pr) quickSort(left, pr, node);
	if (pl <= right) quickSort(pl, right, node);
}

bool compare(int a, int b)
{
	if (a == b)
	{
		return true;
	}
	else {
		return false;
	}
}
int main()
{
	string max;
	getline(cin, max);
	for (int num = 0; num <= stoi(max); num++)
	{
		string str;
		string item;
		vector<string> list;
		getline(cin, str);
		int edge[3];
		stringstream ss(str);
		while (getline(ss, item, ' ') && !item.empty()) {
			list.push_back(item);
		}
		
		edge[0] = stoi(list[0].c_str());
		edge[1] = stoi(list[1].c_str());
		edge[2] = stoi(list[2].c_str());
		quickSort(0, 2, edge);

		int edge1 = edge[2] * edge[2];
		int edge2 = edge[0] * edge[0] + edge[1] * edge[1];
		if (compare(edge1, edge2))
		{
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}
	return 0;
}

C++: #include <iostream>
#include <string>
#include <cctype>
#include <cmath>
#include <stdio.h>
#include <algorithm>
#include <vector>
#include <map> // pair
#include <set>
#define MAXSIZE 200000
#define PI 3.141592653589
using namespace std;

template<typename T>
T add(T a,T b){
  return a+b;
}

namespace A
{
  int f(void){
    return 1;
  }
}

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

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

    if(a*a+b*b==c*c||b*b+c*c==a*a||c*c+a*a==b*b){
      std::cout << "YES" << '\n';
    }else{
      std::cout << "NO" << '\n';
    }
  }

}

C++: #include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
while (n--) {
 int a,b,c;
 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" << endl;
 else 
  cout << "NO" << endl;
 }
return 0;
}

C++: #include <cstdio>

int main()
{
	int N, ia, ib, ic;
	int iTrueFlag[1000];

	scanf("%d",&N);

	for( int i=0;i<N;i++ ){
		scanf("%d %d %d",&ia, &ib, &ic);

		if( (ia*ia) + (ib*ib) == (ic*ic) )
			iTrueFlag[i] = 1;
		else
			iTrueFlag[i] = 0;
	}

	for( int i=0;i<N;i++ ){
		if( iTrueFlag[i] == 1)
			printf("YES\n");
		else
			printf("NO\n");
	}

	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,max,min,mid;
			cin >> a >> b >> c;
			max(a,b,c)=max;
			min(a,b,c)=min;
			if(a!=max&&a!=min){	
				a=mid;
			}if(b!=max&&b!=min){
				b=mid;
			}if(c!=max&&c!=min){
				c=mid;
			}
		if(min*min+mid*mid>=max*max){
			cout<< "YES" << endl;
		}else{
			cout<< "NO" << endl;
		}
	}
	return 0;
}

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

#define DEBUG

#ifndef DEBUG 
#define fprintf (void)
#endif 

int main(void){
	
	long int rec,i,j,t,count;
	long int n[3]={0,0,0};
	
	scanf("%d",&t);
	
	for(i=0;i<t;i++){
		for(j=0;j<3;j++){
			scanf("%ld",&rec);
			if(rec==0){
				count=1;
			}
			if(rec>n[0]){
				n[2]=n[1];
				n[1]=n[0];	
				n[0]=rec;
			}else if(rec>n[1]){
				n[2]=n[1];
				n[1]=rec;
			}else if(rec>n[2]){
				n[2]=rec;
			}
		}
		if(count=1){
			printf("NO\n");
		}else if(n[0]*n[0]==n[1]*n[1]+n[2]*n[2]){
			printf("YES\n");
		}else{
			printf("NO\n");
		}
	}
	
	return 0;
}

C++: //#define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_WARNINGS
//#include <cstdio>
//#include <cstdlib>
//#include <cmath>
#include <iostream>
#include <algorithm>
//#include <cstring>
#include <vector>
#include <string>
#include <map>
#include <list>
#include <queue>
#include <set>
using namespace std;

int main(void){

	int N;
	
	cin >> N;
	
	for(int i = 0; i<3;i++){
		int a, b, c;
		cin >> a >> b >> c;
		if(a > b) swap(a, b);
		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;
}

/*
for(i=0;i<N;i++){
	cin >> X[i];
}


for(i=0;i<N;i++){
	for(j=0;j<N;j++){
		cin >> X[i][j];
	}
}
*/

C++: #include <iostream>

using namespace std;

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

	for(i = 0; i < 3; i++){
		cin >> a[i];
	}
	a[0] = a[0]^2;
	a[1] = a[1]^2;
	a[2] = a[2]^2;

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