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 <stdio.h>
#include <algorithm>

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

int main()
{
	int n;
	int a[3];
	cin >> n;
	
	for (int i = 0; i < n; i++)
	{
		cin >> 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" << endl;
		}
		else {
			cout << "NO" << endl;
		}

	}
	return 0;
}

C++: #include <iostream>

using namespace std;

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

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

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

using namespace std;

typedef long long ll;
typedef pair<ll, ll> P;

#define MOD 1000000007
#define REP(i, N) for (int i = 0; i < N; ++i)
#define REP1(i, N) for (int i = 1; i <= N; ++i)
#define RREP(i, N) for (int i = N - 1; i >= 0; --i)
#define ALL(a) a.begin(), a.end()

int main() {
  int n;
  cin >> n;
  REP(i, n) {
    int a, b, c;
    cin >> a >> b >> c;
    string ans = "NO";
    if (a * a == (c * c - b * b)) ans = "YES";
    if (b * b == (a * a - c * c)) ans = "YES";
    if (c * c == (b * b - a * a)) ans = "YES";
    cout << ans << endl;
  }
  return 0;
}

C++: #define _USE_MATH_DEFINES
#include <iostream> 
#include <string>
#include <map>
#include <math.h>
#include <vector>
#include <algorithm>
using namespace std; 
int main(){
	int N;
	for(int i=0;i<N;i++){
		int a, b, c;
		cin >> a >> b >> c;
		if(a+b <= c || a+c <= b || b+c <= a){
			cout << "NO" << endl;
		}
		else{
			cout << "YES" << endl;
		}
	}
	return 0;
}

C++: #include <iostream>
#include <math.h>
#include <algorithm>

using namespace std;


int main(){
    int input[3];
    int N;
    
    cin>>N;
    
    for(int i=0;i<N;i++){
        cin>>input[0]>>input[1]>>input[2];
        sort(input,input+3);
        cout<<((input[2]==sqrt(pow(input[1],2)+pow(input[0],2)))?"YES":"NO")<<endl;
    }
    return 0;
}

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

int main(void){
    int n;
    cin>>n;
    int a,b,c;
    for (int i = 0; i < n; ++i) {
        cin>>a>>b>>c;
        int m=max(a,max(b,c));
        if(m*m*2==a*a+b*b+c*c)cout<<"YES"<<endl;
        else cout<<"NO"<<endl;
    }
    return 0;
}

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

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

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

int main() {
	int x;
	vector<string> v;
	
	cin >> x;

	for(int i = 0; i < x; i++) {
		int data[3];
		for(int j = 0; j < 3; j++)
			cin >> data[j];
		sort(data, data + 3);

		if(data[2]*data[2] == data[0]*data[0] + data[1]*data[1]) {
			v.push_back("YES");
		} else {
			v.push_back("NO");
		}
	}

	for(int i = 0; i < v.size(); i++) {
		cout << v[i] << endl;
	}

	return 0;
}

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

int main(){

	int l = 0, x = 0, y = 0, z = 0;

	cin >> l;

	for(int i=0; i < l ; i++){
		cin >> x >> y >> z;

		if( x * x == y * y + z * z ||  x * x + y * y == z * z ||  x * x + z * z == y * y){
			cout << "YES" << endl;
		}

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

	return 0;
}

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

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

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

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

C++: #include <stdio.h>

void swap(int* x, int* y)
{
    int swap = *x;
    *x = *y;
    *y = swap;
}

int main(void)
{
    int i, len1, len2, len3, n_iteration;

    scanf("%d", &n_iteration);

    for (i = 0; i < n_iteration; i++) {
        scanf("%d %d %d", &len1, &len2, &len3);
        if (len2 < len3) {
            swap(&len2, &len3);
        }
        if (len1 < len2) {
            swap(&len1, &len2);
        }
        if (len1 * len1 == len2 * len2 + len3 * len3) {
            printf("YES\n");
        } else {
            printf("NO\n");
        }
    }
    return 0;
}

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

int l[3][3];

void swap(int a, int b, int c){
	int buf = l[c][a];
	l[c][a] = l[c][b];
	l[c][b] = buf;
}

//bubble
void sort(int c){
	for(int i = 0; i < 2; i++){
		for(int j = i; j < 2; j++){
			if(l[c][j] > l[c][j+1]) swap(j,j+1,c);	
		}
	}
}

int main(){
int buf;

cin >> buf;

for(int i = 0; i < buf; i++){	
	cin >> l[i][0] >> l[i][1] >> l[i][2];
	sort(i);
}

for(int j = 0; j < buf; j++){
	if(l[j][2]*l[j][2] == l[j][0]*l[j][0] +l[j][1]*l[j][1]){
		cout << "YES";
	}else{
		cout << "NO";
	}
	cout << endl;
}

return 0;
}

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

void judgement(int a, int b, int c) {
	if ((a ^ 2) == (b ^ 2) + (c ^ 2) || (b ^ 2) == (a ^ 2) + (c ^ 2) || (c ^ 2) == (a ^ 2) + (b ^ 2)) {
		cout << "YES" << endl;
	}
	else {
		cout << "NO" << endl;
	}
}

int main() {
	int n;//dataset

	cin >> n;

	vector<int> vector_a;
	vector<int> vector_b;
	vector<int> vector_c;

	for (int i = 0; i < n; i++)
	{
		int a, b, c;
		cin >> a >> b >> c;
		vector_a.push_back(a);
		vector_b.push_back(b);
		vector_c.push_back(c);
	}

	for (int i = 0; i < n; i++) {
		judgement(vector_a[i], vector_b[i], vector_c[i]);
	}

	return 0;

}