Go: package main

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

var (
	sc = bufio.NewScanner(os.Stdin)
)

func main() {
	sc.Scan()
	n, _ := strconv.Atoi(sc.Text())
	for i := 0; i < n; i++ {
		sc.Scan()
		edges := make([]int, 3, 3)
		cols := sort.StringSlice(strings.Split(sc.Text(), " "))
		cols.Sort()
		for i, c := range cols {
			edges[i], _ = strconv.Atoi(c)
			edges[i] = int(math.Pow(float64(edges[i]), 2))
		}
		msg := "NO"
		if edges[2] == edges[0]+edges[1] {
			msg = "YES"
		}
		fmt.Println(msg)
	}
}

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

C++: #include<iostream>
int main(){int t,x,y,z;for(std::cin>>t;t--;printf(x+y-z&&y+z-x&&z+x-y?"NO\n":"YES\n"))std::cin>>x>>y>>z,x*=x,y*=y,z*=z;}

C++: #include <stdio.h>

void right_triangle(int a, int b, int c)
{
    if ((a * a + b * b = c * c) || (a * a + c * c = b * b) || (b * b + c * c = a * a)) {
        printf("YES\n");
    }
    else {
        printf("NO\n");
    }
}

int main(void)
{
    int n, a, b, c;
    scanf("%d", &n);
    for (int i = 0; i < n; ++i) {
        scanf("%d %d %d", &a, &b, &c);
        right_triangle(a, b, c);
    }    
    return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;

int main() {
	int caso;
	int lado_1, lado_2, lado_3;
	
	vector<int> triangle;
	
	cin >> caso;
	
	for(int index = 0; index < caso; ++index) {
		
		triangle.clear();
		
		cin >> lado_1 >> lado_2 >> lado_3;
		triangle.push_back(lado_1);
		triangle.push_back(lado_2);
		triangle.push_back(lado_3);
	
		sort(triangle.begin(), triangle.end());
		
		if( pow(triangle[0], 2) + pow(triangle[1], 2) == pow(triangle[2], 2) )
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}
	
	return 0;
}

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