Go: package main

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

func main() {
	n, err := strconv.Atoi(strScan())
	if err != nil {
		fmt.Println("数字を入力して下さい。")
	} else {
		var counter int = n
		var judgeArr []string
		scanner := bufio.NewScanner(os.Stdin)
		for scanner.Scan() {
			strArr := strings.Fields(scanner.Text())
			castNumArr := StringToInt(strArr)
			judgeArr = append(judgeArr, checkTriangle(castNumArr))
			counter--
			if counter == 0 {
				break
			}
		}
		for _, v := range judgeArr {
			fmt.Println(v)
		}
	}
}

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"
	} else {
		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++: #include <stdio.h>

int f;
void judge(int x, int y, int z)
{    
    if (x * x + y * y == z * z){
        f = 1;
    }  
}


int main(void)
{
    int n, a, b, c;
    scanf("%d", &n);
    for (int i = 0; i < n ; ++i){
        f = 0;
        scanf("%d %d %d", &a, &b, &c); 
        judge (a, b, c); 
        judge (b, c, a); 
        judge (c, a, b);  
        if (f == 1){    
            printf("YES\n");
        }else{	
            printf("NO\n");
        }
    }
    return 0;        
}

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

using namespace std;


#define REP(i,n) for(ll i=0;i<n;++i)
#define RREP(i,n) for(ll i=n-1;i>=0;--i)
#define FOR(i,m,n) for(ll i=m;i<n;++i)
#define RFOR(i,m,n) for(ll i=n-1;i>=m;--i)
#define ALL(v) (v).begin(),v).end()

#define PB(a) push_back(a)
#define MOD 1000000007

typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> VI;
typedef vector<VI> VVI;
const double PI = 3.14159265358979323846;
const double EPS = 1e-12;
const int INF = numeric_limits<int>::max() / 2;
const int NEG_INF = numeric_limits<int>::min() / 2;

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);

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

C++: #include <stdio.h>

int a ;
int b ;
int c ;
int T ;

int main ( )
{
	while ( scanf ( "%d" , &T ) == 1 ) {
		while ( T-- ) {
			scanf ( "%d %d %d" , &a , &b , &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" ) ;
			}
		}
	}
}

C++: #include <iostream>
using namespace std;
int main(){

	int a;
	int b;
	int c;

	int n;
	cin >> n;

	for(int i=1; i<=n; i++){

		cin >> a >> b >> c;

		if(a*a+b*b==c*c){

			cout << "Yes\n";

		}
		else {
			cout << "No" << endl;
		}
	}
}

C++: 





#include <iostream>
#include <algorithm>
#include <cstdio>

using namespace std;

#define COMPARE(left , right)   (left == right ? "YES" : "NO")
#define SQUARE(value)			(value * value)
#define SIZE	3

int main(void)
{
	int ansArray[SIZE] = {0};
	int n;

	cin >> n;

	for (int i = 0; i < n; i++)
	{
		for (int j = 0; j < SIZE; j++)
		{
			cin >> ansArray[j];
		}

		sort(ansArray , ansArray + SIZE);

		cout << COMPARE(SQUARE(ansArray[0]) +SQUARE( ansArray[1]) , SQUARE(ansArray[2])) << endl;
	}

	return 0;
}

C++: #include <iostream>
#include <vector>
#include <utility>
#include <string>
#include <algorithm>
#include <numeric>
#include <cmath>
#include <string.h>
#include <deque>
#define REP(i,j,n) for(int i=j;i<n;i++)
#define SORT(x) sort(x.begin(),x.end())

using namespace std;



int main() {
	int n,a, b, c;
	cin >> n;
	REP(i, 0, 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" << endl;
		}
		else cout << "NO" << endl;
	}
	return 0;
}

C++: 
#include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>

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

}

C++: #include <iostream>

using namespace std;

bool isRightTriangle(int a, int b, int c)
{
	return (a*a + b*b == c*c);
}

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

C++: #include<stdio.h>

int main(){
	
	int a,b,c,N,t,A,B,C;
	
	scanf("%d",&N);
	
	for(t=0;t<N;t++){
		
		scanf("%d %d %d",&a,&b,&c);
		
		A=a*a-b*b-c*c;
		B=b*b-c*c-a*a;
		C=c*c-a*a-b*b;
		
		if(A==0||B==0||C==0){
			
			printf("YES\n");
		}
		else printf("NO\n");
		
	}
	
	return 0;
	
}

C++: ///
// File:  0003.cpp
// Author: ymiyamoto
//
// Created on Sat Nov  4 15:48:51 2017
//

#include <cstdint>
#include <iostream>

using namespace std;

int32_t main()
{
  uint32_t N;
  cin >> N;
  for (uint32_t i = 0; i < N; i++) {
    uint32_t a, b, c;
    cin >> a >> b >> c;
    if (a + b > c && b + c > a && c + a > b) {
      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 r[3];
		cin >> r[0] >> r[1] >> r[2];
		sort(r, r+3);
		if(r[0]*r[0]+r[1]*r[1]==r[2]*r[2]){
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		}

	}
}

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) {
		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 <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<(n); i++)
#define FOR(i,x,n) for(int i=x; i<(n); i++)
#define ALL(n) begin(n),end(n)
#define MOD (1000000007)
#define INF (1e9)
#define INFL (1e18)
 
typedef long long ll;
typedef unsigned int ui;
typedef unsigned long long ull;
template<class T>using arr=vector<vector<T>>;
template<class T>void pr(T x){cout << x << endl;}
template<class T>void prvec(vector<T>& a){rep(i, a.size()-1){cout << a[i] << " ";} cout << a[a.size()-1] << endl;}
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

void IsRightTriangle(int a, int b, int c){
    a *= a;
    b *= b;
    c *= c;
    if(a == b + c || b == c + a || c == b + a) pr("YES");
    else pr("NO");
}

int main()
{
    int n; cin >> n;
    rep(i, n){
        int a, b, c; cin >> a >> b >> c;
        IsRightTriangle(a, b, c);
    }
    return 0;}

C++: #include<iostream>
#include<math.h>
using namespace std;
int main(){
  int n,j=0;
  int max,min=0,a,b,c;
  cin>>n;
  while(j<n){
      cin>>a>>b>>c;
    if(pow(a,2)==pow(b,2)+pow(c,2)||
       pow(b,2)==pow(a,2)+pow(c,2)||
       pow(c,2)==pow(a,2)+pow(b,2)){
    cout<<"Yes"<<endl;
  }
  else{
    cout<<"No"<<endl;
  }
  j++;
  }
  return 0;
}