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>
using namespace std;

template <typename T>
bool isRight_Triangle ( T a, T b, T c )
{
	return (a * a + b * b == c * c) || (a * a + c * c == b * b) || (b * b + c * c == a * a);
}

int main() {
	int n;
	while (cin >> n) {
		for (int i = 0; i < n; ++i) {
			int a, b, c;
			cin >> a >> b >> c;

			if (isRight_Triangle(a, b, c)) {
				cout << "YES" << endl;
			}
			else {
				cout << "NO" << endl;
			}
		}
	}
	return 0;
}

C++: #include <stdio.h>

int main(void)
{
	int a,b,c;
	int i;
	int times;
	
	scanf("%d",&times);
	
	for(i=0;i<times;i++)
	{
		scanf("%d %d %d",&a,&b,&c);
		
		if(0.0 == (double)(a*a + b*b - c*c)/(2*a*b))
		{
			printf("YES\n");
		}
		else if(0.0 == (double)(b*b + c*c - a*a)/(2*b*c))
		{
			printf("YES\n");
		}
		else if(0.0 == (double)(c*c + a*a - b*b)/(2*c*a))
		{
			printf("YES\n");
		}
		else
		{
			printf("NO\n");
		}
	}
	
	return 0;
}

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

int main(){
  int n;
  int t[3];
  cin >> n;

  for(int i=0;i<n;i++){
    for(int j=0;j<3;j++) cin >> t[j];
    sort(t,t+3); //昇順
    if(a[0]*a[0] + a[1]*a[1] == a[2]*a[2]) cout << "YES" << endl;
    else 
      cout << "NO" <<endl;
  }
  return 0;
}

C++: #include<cstdio>
int main(){char a[9];puts(*gets(a)&a[2]^a[4]?"Open":"Close");}

C++: #include<cstdio>
int main(){scanf("%*d");for(int a,b,c;~scanf("%d%d%d",&a,&b,&c);puts(b+c-a?a+c-b?a+b-c?"NO":"YES":"YES":"YES")){a*=a;b*=b;c*=c;}}

C++: #include <iostream>
using namespace std;
int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n;
    cin >> n;
    for (int i = 0; i < n; i++) {
        int a = 0; int b = 0; int c = 0;
        for (int j = 0; j < 3; j++) {
            int x; cin >> x;
            if (x > a) { c = b; b = a; a = x; }
            else if (x > b) { c = b; b = x; }
            else if (x > c) { c = x; }
        }
        if (a * a == b * b + c * c)
            cout << "YES\n";
        else
            cout << "NO\n";
    }
}

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

int N;

string solve(int* a) {
    if ( ((a[0]*a[0]) + (a[1]*a[1])) == (a[2]*a[2]) ) {
        return "YES";
    }
    return "NO";
}

int main() {
    cin >> N;

    int a[3] = {0};
    while (cin >> a[0]) {
        cin >> a[1];
        cin >> a[2];
        sort(a, a+3);
        string res = solve(a);
        cout << res << endl;
    }

    return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<functional>
using namespace std;
#define rep(i,n) for(i = 0;i < n;i++)

int N;
int main(){
	int i;
	char *str[1001];
	cin >> N;
	rep(i,N){
		int l[3];
		cin >> l[0] >> l[1] >> l[2];
		sort(l,l+3,greater<int>());
		if(l[0]*l[0] == l[1]*l[1]+l[2]*l[2])
			str[i] = "YES";
		else
			str[i] = "NO";
	}
	rep(i,N){
		cout << str[i] << endl;
	}
	return 0;
}

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

int main(){
	int n;
	scanf("%d", &n);
	int a[3];
	for (int i = 0; i < n; i++){
		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>
using namespace std;

int main()
{
 int n;
 int a[1000], b[1000], c[1000];

 cin >> n;
 for(int i=0; i<n; i++) cin >> a[i] >> b[i] >> c[i];

 for(int i=0; i<n; i++){
  if(a[i]*a[i] == b[i]*b[i] + c[i]*c[i] | b[i]*b[i] == a[i]*a[i] + c[i]*c[i] | c[i]*c[i] == a[i]*a[i] + b[i]*b[i]) cout << "YES\n";
  else cout << "NO\n";
 }

 return 0;
}

C++: #include <iostream>

using namespace std;

int main(void) {
	int N;
	
	cin >> N;
	for(int i = 0; i < N; i++) {
		int len[3];
		cin >> len[0] >> len[1] >> len[2];
		
		if(len[0] > len[1]) {
			int tmp = len[0];
			len[0] = len[1];
			len[1] = tmp;
		}
		if(len[1] > len[2]) {
			int tmp = len[1];
			len[1] = len[2];
			len[2] = tmp;
		}
		if(len[0] > len[1]) {
			int tmp = len[0];
			len[0] = len[1];
			len[1] = tmp;
		}
		
		if(len[2] * len[2] == len[0] * len[0] + len[1] * len[1]) {
			cout << "YES" << endl;
		} else {
			cout << "NO" << endl;
		}
	}
	return 0;
}

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

int main()
{
	int i, n;
	cin >> n;
	for (i = 1; i <= n; i++){
		int n1, n2, n3, a, b, c;
		cin >> n1 >> n2 >> n3;
		a = n1 > n2 ? n1 : n2;
		b = n1 + n2 - a;
		c = a > n3 ? a : n3;
		a= a + n3 - c;
		if (c == sqrt(a * a + b * b))
			cout << "YES\n";
		else cout << "NO\n";
	}
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;

bool right(int a,int b,int c){
	return ((c*c==a*a+b*b)?1:0);
}

int main(){
	int n;
	cin>>n;
	int a[3];
	bool ans[n];
	for(int i=0;i<n;i++){
		cin>>a[0]>>a[1]>>a[2];
		sort(a,a+3);
		ans[i]=right(a[0],a[1],a[2]);
	}
	for(int i=0;i<n;i++) cout<<((ans[i])?"YES":"NO")<<endl;
	return 0;
}

C++: #include<stdio.h>
#include<algorithm>

using namespace std;

int main(){
	int n,a,b,c;
	int m=0;
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		int a[3];
		for(int j=0;j<3;j++)scanf("%d",&a[j]);
		std::sort(a,a+3);
		
		int d = 0;
		if(a[0]>d || a[1]>d || a[2]>d)puts("hogehogehoge");
		
		if(a[0]*a[0]+a[1]*a[1] == a[2]*a[2]){
			puts("YES");
		}else{
			puts("NO");
		}
	}
}

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)
            cout << "YES" << endl;
        else if (a^2+c^2 == b^2)
            cout << "YES" << endl;
        else if (b^2+c^2 == a^2)
            cout << "YES" << endl;
        else
            cout << "NO" << endl;
    }
}

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

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<ll, ll> P;

#define EACH(i,a) for (auto& i : a)
#define FOR(i,a,b) for (ll i=(a);i<(b);i++)
#define RFOR(i,a,b) for (ll i=(b)-1;i>=(a);i--)
#define REP(i,n) for (ll i=0;i<(n);i++)
#define RREP(i,n) for (ll i=(n)-1;i>=0;i--)
#define debug(x) cout<<#x<<": "<<x<<endl
#define pb push_back
#define ALL(a) (a).begin(),(a).end()

const ll linf = 1e18;
const int inf = 1e9;
const double eps = 1e-12;
const double pi = acos(-1);

template<typename T>
istream& operator>>(istream& is, vector<T>& vec) {
    EACH(x,vec) is >> x;
    return is;
}
template<typename T>
ostream& operator<<(ostream& os, vector<T>& vec) {
    REP(i,vec.size()) {
        if (i) os << " ";
        os << vec[i];
    }
    return os;
}
template<typename T>
ostream& operator<<(ostream& os, vector< vector<T> >& vec) {
    REP(i,vec.size()) {
        if (i) os << endl;
        os << vec[i];
    }
    return os;
}

int main() {
    std::ios::sync_with_stdio(false);
    std::cin.tie(0);
    ll Q; cin >> Q;
    while ( Q-- ) {
        vector<ll> len(3); cin >> len;
        sort(ALL(len));
        if (len[0] * len[0] + len[1] * len[1] == len[2] * len[2]) {
            cout << "YES" << endl;
        }
        else {
            cout << "NO" << endl;
        }
    }
}