Go: package main

import (
  "fmt"
)


func main() {
  var a int
  var b int
  var c int
  var n int
  fmt.Scan(&n)
  for _, err := fmt.Scan(&a, &b, &c); err == nil; _, err = fmt.Scan(&a, &b, &c) {
    if a*a == b*b+c*c {
      fmt.Println("YES")
    } else if b*b == c*c+a*a {
      fmt.Println("YES")
    } else if c*c == a*a+b*b {
      fmt.Println("YES")
    } else {
      fmt.Println("NO")
    }
  }
}

C++: #include <stdio.h>

int main(){

	int N = 0, a, b, c,i;

	scanf("%d",&N);
	for (i = 0; i < N;i++)
	if (a*a + b*b == c*c){
		printf("YES\n");
	}
	else if (a*a + c*c == b*b){
		printf("YES\n");
	}else if (b*b + c*c == a*a){
		printf("YES\n");
	}else{
		printf("NO\n"); }
	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
  int a[10000],b[10000],c[10000],n;
  cin>>n;
  for(int i=0;i<n;i++){
  cin>>a[i]>>b[i]>>c[i];
  a[i]*=a[i];
  b[i]*=b[i];
  c[i]*=c[i];
  }
  for(int i=0;i<n;i++){
  if(a[i]+b[i]==c[i]||a[i]+c[i]==b[i]||b[i]+c[i]==a[i]){
    cout<<"YES"<<endl;
  }else{
    cout<<"NO"<<endl;
  }
  }
  return(0);
}

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

bool isTriangle(int a, int b, int c);

int main(){
	int a, b, c, count;
	bool check;
	
	std::cin >> count;
	
	for(int i = 0; i < count; ++i){
		std::cin >> a >> b >> c;
		
		int max_num = std::max({a, b, c});
		if(max_num == a) check = isTriangle(b, c, a);
		else if(max_num == b) check = isTriangle(a, c, b);
		else if(max_num == c) check = isTriangle(a, b, c);
		
		if(check) std::cout << "YES" << std::endl;
		else std::cout << "NO" << std::endl;
	}
	
	return 0;
}

bool isTriangle(int a, int b, int c){
	if(std::pow(a, 2) + std::pow(b, 2) == std::pow(c, 2)) return true;
	else return false;
}

C++: #include <iostream>
#include <cmath>
//#include <vector>

#define upper 1000
#define lower 1
#define eN 1000

using namespace std;


void swap(int& e1, int& e2, int& e3){
	if (e1 > e2){
		int tmp = e1;
		e1 = e2;
		e2 = tmp;
	}
	if (e2 > e3){
		int tmp = e2;
		e2 = e3;
		e3 = tmp;
	}
	if (e1 > e3){
		int tmp = e1;
		e1 = e3;
		e3 = tmp;
	}
}

bool check(int e1, int e2, int e3){
	if (((e1*e1)+(e2*e2)) == (e3*e3)){
		return true;
	}
	else{
		false;
	}
}

int main(void){
	int N = 1;
	cin >> N;
	//vector<bool> arr;

	for (int i=0; i<N; ++i){
		int e1, e2, e3;
		cin >> e1 >> e2 >> e3;
		swap(e1,e2,e3);
		if (check(e1, e2, e3)==true){
			cout << "YES" << endl;
		}
		else{
			cout << "NO" << endl;
		}
		//arr.push_back(check(e1,e2,e3));
	}
	/*for (int i=0; i<N; ++i){
		if (arr[i] == true){
			cout << "YES" << endl;
		}
		else{
			cout << "NO" << endl;
		}
	}*/
	return 0;
}

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

int main()
{
	int nNum=0;
	cin>>nNum;
	int nIn[3]={0};
	while(nNum--)
	{
		cin>>nIn[0]>>nIn[1]>>nIn[2];
		int nMax=max(max(nIn[0],nIn[1]),nIn[2]);
		if(nMax==nIn[2])
		{
			swap(nIn[2],nIn[0]);
		}
		else if (nMax==nIn[1])
		{
			swap(nIn[1],nIn[2]);
		}
		if(nIn[0]*nIn[0]==nIn[1]*nIn[1]+nIn[2]*nIn[2])
		{
			cout<<"YES"<<endl;
		}
		else
		{
			cout<<"NO"<<endl;
		}
	}
	return 0;
}

C++: #include<iostream>
#include<stdio.h>
using namespace std;
int main(){
  int a,b,c;
  int n;
  int 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<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';
    }
  }

}