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 <iostream>
#include <cmath>
using namespace std;

inline bool is_right_triangle(int a, int b, int c){
	return (a*a == b*b + c*c || b*b == a*a + c*c || c*c == a*a + b*b) ? true : false;
}


int main() {
	ios::sync_with_stdio(false);
	int n, a, b, c;
	cin >> n;
	for(int i=0; i<n; i++){
		cin >> a >> b >> c;
		if(is_right_triangle(a,b,c)) cout << "YES" << "\n";
		else cout << "NO" << "\n";
	}

}

C++: #include <iostream>

using namespace std;

int main()
{
	int a,b, c,i,count;
	bool ret;
	scanf("%d",&count);
	for(i = 0; i < count; i++ ) {
		cin >> a >> b >> c;
		a *= a;
		b *= b;
		c *= c;
		ret = false;
		if( a + b == c ){
			ret = true;
		}
		else if( a + c == b ) {
			ret = true;
		}
		else if ( b + c == a ) {
			ret = true;
		}
		
		if( ret == true ) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}	
	}

	return 0;
}

C++: #include <iostream>

#include <vector>

#include <algorithm>

using namespace std;



int main() {

    int N;

    cin >> N;

    vector<int> sides(3);

    for (int n = 0; n != N; ++n) {

        cin >> sides[0] >> sides[1] >> sides[2];

        sort(sides.begin(), sides.end());

        if (sides[0]*sides[0] + sides[1]*sides[1] == sides[2]*sides[2]) {

            cout << "YES" << endl; 

        }

        else {

            cout << "NO" << endl;

        }

    }

    return 0;

}

C++: #include <iostream>

void rightTriangle(int, int, int);
int main()
{
    int N;
    std::cin >> N;
    for (int i = 0; i < N; ++i) {
        int a, b, c;
        std::cin >> a >> b >> c;
        rightTriangle(a, b, c);
    }
    return 0;
}
void rightTriangle(int a, int b, int c)
{
    if (a * a + b * b == c * c
        || b * b + c * c == a * a
        || c * c + a * a == b * b) {
        std::cout << "YES" << std::endl;
    } else {
        std::cout << "NO" << std::endl;
    }
}

C++: 
#include <iostream>
#include <stdlib.h>
using namespace std;
int main()
{
	int N,d[1010],i=0,j=0;
	float a,b,c;
	cin>>N;
	j=N;
		while(j--)
		{
			cin>>a>>b>>c;
			if (a*a+b*b==c*c)
				//d[i]=1;
				cout<<"YES"<<endl;
			else
				cout<<"NO"<<endl;
				//d[i]=0;
			//i++;
		}
// 		for (i=0;i<N;i++)
// 		{
// 			if (d[i])
// 				cout<<"YES"<<endl;
// 			else
// 				cout<<"NO"<<endl;
// 		}
	return 0;
}

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

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef complex<double> P;
typedef pair<int,int> pii;
#define REP(i,n) for(ll i=0;i<n;++i)
#define REPR(i,n) for(ll i=1;i<n;++i)
#define FOR(i,a,b) for(ll i=a;i<b;++i)

#define DEBUG(x) cout<<#x<<": "<<x<<endl
#define DEBUG_VEC(v) cout<<#v<<":";REP(i,v.size())cout<<" "<<v[i];cout<<endl
#define ALL(a) (a).begin(),(a).end()

#define MOD (ll)(1e9+7)
#define ADD(a,b) a=((a)+(b))%MOD
#define FIX(a) ((a)%MOD+MOD)%MOD

int main(){
  int n;
  cin>>n;
  while(n--){
    int a,b,c;
    cin>>a>>b>>c;
    if(a>b)swap(a,b);
    if(b>c)swap(b,c);
    if(a*a+b*b==c*c){
      cout<<"YES"<<endl;
    }else{
      cout<<"NO"<<endl;
    }
  }
  return 0;
}

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

C++: #include<stdio.h>


int main(){
	int n,a[3];
	scanf("%d",&n);
	int i,j,k;
	for(k=0;k<n;k++){
		scanf("%d %d %d",&a[0],&a[1],&a[2]);
		for(i=0;i<3;i++){
			a[i]=a[i]*a[i];
		}
		j=0;
		for(i=0;i<3;i++){
			if((j=0)||(a[i%3]-a[(i+1)%3]-a[(i+2)%3]==0)){
				j=1;
			}
		}
		if(j==1){
			printf("YES\n");
		}else{
			printf("NO\n");
		}

	}
	return 0;
}

C++: 
//include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <string>
#include <cstring>
#include <ctime>


using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) { int v; istringstream sin(s); sin >> v; return v; }
template<class T> inline string toString(T x) { ostringstream sout; sout << x; return sout.str(); }

//math
//-------------------------------------------
template<class T> inline T sqr(T x) { return x*x; }

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;

//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define EXISTch(s,c) ((((s).find_first_of(c)) != std::string::npos)? 1 : 0)//cがあれば1 if(1)
#define SORT(c) sort((c).begin(),(c).end())

//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n)  FOR(i,0,n)
#define loop(n) FOR(i,0,n)
#define rrep(i,a,b) for(int i=(a);i>=(b);--i)
//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI = acos(-1.0);
const int INF = (int)1000000007;
const LL MOD = (LL)1000000007;//10^9+7
const LL INF2 = (LL)100000000000000000;//10^18



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

	for (int i = 0; i < n; i++) {
		vector<int>e(3);
		
		cin >> e[0] >> e[1] >> e[2];

		sort(e.begin(), e.end());

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

C++: #include<iostream>
#include<vector>
#include<algorithm>
int main(){
  using namespace std;
  int N;
  cin >> N;
  for(int i = 0; i < N; i++){
    vector<int> edge(3);
    for(int j = 0; j < 3; j++){
      cin >> edge[j];
    }
    sort(edge.begin(), edge.end());
    int l,m,s;
    s = edge[0];
    m = edge[1];
    l = edge[2];
    if(l*l == m*m + s*s){
      cout << "YES" << endl;
    }else{
      cout << "NO" << endl;
    }
  }
}

C++: #include <iostream>
using namespace std;
int main(){
    int a,b,c,n;
    cin >> n;
    for (;0<n;n--){
        cin >> a >> b >> c;
        if (a^2+b^2!=c^2 && a^2+c^2!=b^2 && b^2+c^2!=a^2)
            cout << "NO" << endl;
        else
            cout << "YES" << endl;
    }
}

C++: #include <bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;i++)
using namespace std;
typedef long long ll;

int main() {
	int a[3];
	int n; cin >> n;
	rep(i,n) {
		cin >> a[0] >> a[1] >> a[2];
		sort(a, a + 3);
		if (a[2] * a[2] == a[0] * a[0] + a[1] * a[1])puts("YES");
		else puts("NO");
	}
	return 0;
}