Go: package main

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

func sliceAtof64(sa []string) ([]float64, error) {
	si := make([]float64, 0, len(sa))
	for _, a := range sa {
		i, err := strconv.ParseFloat(a, 64)
		if err != nil {
			return si, err
		}
		si = append(si, i)
	}
	return si, nil
}

func answer(ans bool) {
	if ans {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}
func isRightTriangle(ary []float64) (ans bool) {
	sort.Sort(sort.Reverse(sort.Float64Slice(ary)))
	ans = math.Pow(ary[1], 2.0)+math.Pow(ary[2], 2.0) == math.Pow(ary[0], 2.0)

	return
}

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	lineCount, _ := strconv.Atoi(scanner.Text())
	lines := make([]string, lineCount)

	for i := 0; i < lineCount; i++ {
		scanner.Scan()
		lines[i] = scanner.Text()
	}

	for _, v := range lines {
		ary, _ := sliceAtof64(strings.Split(v, " "))
		answer(isRightTriangle(ary))
	}
}

C++: #include<cstdio>

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

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
  int n,j=0;
  int a[3];
  cin>>n;
  while(j!=n){
    for(int i=0;i<3;i++){
      cin>>a[i];
    }
    sort(a,a+3);
    if(a[2]*a[2]==a[1]*a[1]+a[0]*a[0]){
    cout<<"YES"<<endl;
  }
  else{
    cout<<"NO"<<endl;
  }
    j++;
  }
  return 0;
}

C++: int main(){ return 0;}

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

using namespace std;

#define LOG(...) fprintf(stderr, __VA_ARGS__)
//#define LOG(...)
#define FOR(i, a, b) for(int i=(int)(a); i<(int)(b); ++i)
#define REP(i, n) for(int i=0; i<(int)(n); ++i)
#define ALL(a) (a).begin(), (a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define EXIST(s, e) ((s).find(e)!=(s).end())
#define SORT(c) sort(ALL(c))
#define RSORT(c) sort(RALL(c))
#define SQ(n) (n) * (n)

typedef long long ll;
typedef unsigned long long ull;
typedef vector<bool> vb;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<vb> vvb;
typedef vector<vi> vvi;
typedef vector<vll> vvll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

int main() {
  vi tri(3);
  int n;
  cin >> n;
  REP(i, n){
    cin >> tri[0] >> tri[1] >> tri[2];
    SORT(tri);
    cout << (SQ(tri[0]) + SQ(tri[1])== SQ(tri[2]) ? "YES" : "NO") << endl;
  }
}

C++: #include <iostream>
//#include <cstdio>
//#include <cmath>
using namespace std;
 
//0003
int main(){
	int n;
	int a, b, c, a2, b2, c2;
	while(--n){
		cin >> a >> b >> c;
		a2 = a^2;
		b2 = b^2;
		c2 = c^2;

		if(a==b==c) cout << "NO" << endl;
		if(a2==b2+c2 || b2==a2+c2 || c2==a2+b2){
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		}
	}
	return 0;
}

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

int main() {

    int N;
    cin >> N;
 
    int hen[3];
    while (N --> 0) {
        cin >> hen[0] >> hen[1] >> hen[2];
        sort(hen, hen + 3);
        
        if (hen[2] * hen[2] == hen[0] * hen[0] + hen[1] * hen[1]) {
            cout << "YES";
        } else {
            cout << "NO";
        }
    }
    

    return 0;
}

C++: //
//  main.cpp
//  CppTest
//
//  Created by Ryu on 2017/02/08.
//  Copyright ?? 2017??´ Ryu. All rights reserved.
//

#include <iostream>
#include <algorithm>
#include <cmath>
using namespace std;

int main(int argc, const char * argv[]) {
    // insert code here...
    cin.tie(0);
    ios::sync_with_stdio(false);
    
    int n;
    cin >> n;
    
    long t[n][3];
    for(int i = 0; i < n; i++){
        cin >> t[i][0] >> t[i][1] >> t[i][2];
        sort(t[i], t[i] + 3);
    }
    for (int i = 0; i < n; i ++) {
        //printf("(%ld, %ld, %ld)", t[i][0], t[i][1], t[i][2]);
        if(pow(t[i][0], 2) + pow(t[i][1], 2) == pow(t[i][2], 2)){
            cout << "YES" << endl;
        }else{
            cout << "NO" << endl;
        }
    }
    
    return 0;
}

C++: #include<iostream>
#include<cmath>
int main(){
	int n;
	cin >> n;
	for(int i = 0; i < n; i++){
		int a, b, c;
		cin >> a >> b >> c;
		int x, y, z;
		x = max(a,max(b,c));
		y = min(a,min(b,c));
		z = (a+b+c) - x - y;
		
		if(x*x == y*y + z*z)
			cout << "Yes" << endl;
		else
			cout << "No" << endl;
			
}

C++: #include<iostream>
#include <algorithm>
using namespace std;
int main() {
    int a[3],n;
	cin>>n;
	for(int i=1;i<=n;i++){
	for(int j=0;j<3;j++) cin>>a[j];
    sort(a, a + 3);             
	a[0]*=a[0];
	a[1]*=a[1];
	a[2]*=a[2];
	if(a[0]+a[1]!=a[2]){
	cout<<"NO\n";
	}else{cout<<"YES\n";}
	}
	return 0;
}

C++: #include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
#define all(v) v.begin(),v.end()
using namespace std;
int main(){
  vector<int> a(3,0);
  int n;
  cin>>n;
  vector<int> ans(n,0);
  rep(i,n){
    cin>>a[0]>>a[1]>>a[2];
    sort(all(a));
    if(a[2]*a[2]==a[1]*a[1]+a[0]*a[0])ans[i]++;
  }
  rep(i,n){
    if(ans[i]!=0)cout<<"YES"<<endl;
    else cout<<"NO"<<endl;
  }
}

C++: #include <iostream>
#include <algorithm>
#include <functional>
inline int mulpli(int a,int b,int c){
  using std::cout;
  using std::endl;
  if(a*a==b*b+c*c){
    cout<<"YES"<<endl;
  }
  else{
    cout<<"NO"<<endl;
  }
}
int main(){
  int n,a,b,c;
  using std::cin;
  cin>>n;
  while(n){
    cin>>a>>b>>c;
    if(a==b&&a==c)mulpli(a,b,c);
    if(a>b&&a>c)mulpli(a,b,c);
    if(b>a&&b>c)mulpli(b,a,c);
    if(c>a&&c>b)mulpli(c,a,b);
    n--;
  }
  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 
		cout << "NO" << endl;
		i++;
	}while(i <= n);
	
	return 0;
}

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

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

bool check(int a,int b,int c){
	if(a*a==(b*b+c*c)) return true;
	else return false;
}

int main(void){
	int a,b,c;
	int N;
	int i;

	cin >> N;

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

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

char const *answer(int a,int b,int c){
	if(c*c == (a*a+b*b))	return "YES";
	else		return "NO";
}

int swap(int x,int y){
	int temp = x;
	x = y;
	y = temp;
}

int main() {
	int n,a,b,c;
	cin >> n;
	for(int i=0;i<n;i++){
	cin >> a >> b >> c;
	if(a>b) swap(a,b);
	if(b>c) swap(b,c);
	cout << answer(a,b,c) << endl;
	}
}

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

#define add push_back
#define inf 2147000000

#define rep(i,n) for(int i=0;i<n;i++)

using namespace std;

int main(void){
	int a[3];
	int n;
	scanf("%d",&n);
	rep(q,n){
		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]){
			cout<<"YES\n";
		}else{
			cout<<"NO\n";
		}
	}
}

C++: /*http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0003&lang=jp*/

#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main(){
    int n;

    cin>>n;
    for (int i = 0; i < n; ++i) {
        vector<int> lens;
        for (int j = 0; j < 3; ++j) {
            int tmp;
            cin>>tmp;
            lens.push_back(tmp);
        }
        sort(lens.begin(),lens.end(),greater<int>());
        if(pow(lens[0],2)==pow(lens[1],2)+pow(lens[2],2)){
            cout<<"YES"<<endl;
        }else{
            cout<<"NO"<<endl;
        }
    }
    return 0;
}