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>
    
int triJudgefunc(int x, int y, int z);
    
int main(void)
{
    int row;
    scanf("%d", &row);
    for (int i = 0; i < row; ++i) {
        int firstn, secondn ,thirdn; 
        scanf("%d %d %d", &firstn, &secondn, &thirdn);
        if (triJudgefunc(firstn, secondn, thirdn) = 0) {
        printf("YES\n");
        } else {
        printf("NO\n");
        }
    }
    return 0;
}
    
    
    
int triJudgefunc(int x, int y, int z)
{
    int maxlength, notmax1, notmax2;
    if (x > y) {    //x > y
        if (x > z) {
            maxlength = x; notmax1 = y; notmax2 = z;    //x???max
        } else {
            notmax1 = x; notmax2 = y; maxlength = z;    //z???max
        }
    } else {    //y > x
        if (y > z) {
            notmax1 = x; maxlength = y; notmax2 = z;    //y???max
        } else {
            notmax1 = x; notmax2 = y; maxlength = z;    //z???max
        }
    }
    int result = maxlength * maxlength - notmax1 * notmax1 - notmax2 * notmax2;
    return result;
}

C++: #include <cstdio>
int main(){
 int n,a,b,c,m;
 scanf("%d",&n);
 while(n>0){
  scanf("%d %d %d",&a,&b,&c);
  m=a>b?(a>c?a:c):(b>c?b:c);
  if (a*a+b*b+c*c==2*m*m) printf("YES\n")
  else printf("NO\n");
  --n;
 };
 return 0;
};

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

int main()
{
        using namespace std;
        deque<int> edge;
        int iedge[3];
        int j;
        int a,b,c;

        cin >> j;

        for(int l=0;l<j;l++){
                for(int i=0;i<3;i++){
                        cin >> iedge[i];
                edge.push_back(iedge[i]);
                }

                sort(edge.begin(),edge.end());
                a = edge[0];
                b = edge[1];
                c = edge[2];
                if(c*c == (a*a+b*b))cout << "Yes\n";
                else cout << "No\n";

        }

        return 0;
}

C++: #include <iostream>
#include <cstdlib>
#include <stdio.h>
#include <cmath>

using namespace std;


int main(){
    int a, b, c;
    char* str;
    str = (char*)malloc(sizeof(char) * 50);

    fgets(str, 50, stdin); // 読み捨て

    while(fgets(str, 50, stdin) != NULL) {
        sscanf(str, "%d%d%d", &a, &b, &c);
        a = pow(a, 2);
        b = pow(b, 2);
        c = pow(c, 2);

        cout << ((a + b == c || b + c == a || b + c == a) ? "YES" : "NO") << endl;
    }

    return 0;
}

C++: 
#include <iostream>

using namespace std;

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

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

int main (void){
  int a[] = {0, 0, 0};
  int p;
  cin >> p;
  for(int j=0;j<p;j++){
    for(int i=0;i<3;i++) cin >> a[i];
    sort(a,a+3);
    if(pow(a[2],2) == (pow(a[1],2) + pow(a[0],2))){
      cout << "YES" << endl;
    }else{
      cout << "NO" << endl;
    }
  }
  return 0;
}

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

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

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

    
  return 0;
}

C++: #include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include<iostream>
using namespace std;

void sort(int* rep) {
	bool flg = true;
	int temp;

	do{
		flg = false;
		if (rep[0] < rep[1]) {
			temp = rep[0];
			rep[0] = rep[1];
			rep[1] = temp;
			flg = true;
		}
		if (rep[1] < rep[2]) {
			temp = rep[1];
			rep[1] = rep[2];
			rep[2] = temp;
			flg = true;
		}
	} while (flg);
}




int main() {

	int size;

	cin >> size;

	int a[3];
	int ans[1000];

	for (int i = 0; i < size; i++) {
		for (int j = 0; j < 3; j++)cin >> a[j];
		sort(a);

		if (a[0] * a[0] == a[1] * a[1] + a[2] * a[2]) {
			ans[i] = true;
		}
		else {
			ans[i] = false;
		}
	}

	for (int i = 0; i < size; i++) {
		if (ans[i])printf("YES\n");
		else printf("NO\n");
	}

	//system("pause");
	return 0;
}

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

int main() {
    int N;
    cin >> N;
    int a, b, c;
    while (N--) {
        cin >> a >> b >> c;
        int l=max(a,max(b,c));
        int x, y;
        if (a==l) {
            x=b;
            y=c;
        } else if (b==l) {
            x=a;
            y=c;
        } else if (c==l) {
            x=a;
            y=b;
        }
        if (l==sqrt(pow(x,2)+pow(y,2))) {
            printf("YES\n");
        } else {
            printf("NO\n");
        }
    }
    return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cctype>
#include <cstring>
#include <sstream>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <list>
#include <stack>
#include <queue>
#include <algorithm>
#include <complex>
#include <iterator>
using namespace std;

typedef pair<int, int> pii;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;

#define all(c) (c).begin(), (c).end()
#define rall(c) (c).rbegin(), (c).rend()
#define tr(c, i) for(auto i = (c).begin(); i != (c).end(); i++)
#define rtr(c, i) for(auto i = (c).rbegin(); i != (c).rend(); i++)
#define repfn(i, a, cont, next) \
  for(auto i = (a); [=](){return(cont);}(); i = [=](){return(next);}())
#define repby(i, a, b, step) repfn(i, a, i < b, i + step)
#define repab(i, a, b) repby(i, (a), (b), 1)
#define rep(i, n) repab(i, 0, (n))
#define pb push_back
#define sz(c) int((c).size())

int main(int argc, char **argv)
{
  int N;
  vi v(3);
  cin >> N;
  while (N--) {
    cin >> v[0] >> v[1] >> v[2];
    sort(all(v));
    if (v[0]*v[0] + v[1]*v[1] == v[2]*v[2])
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}

C++: #include <iostream>
#include <cmath>
#include <queue>
#include <vector>

using namespace std;

int main()
{
    double a,b,c;
    int n,i;
    priority_queue<double, vector<double>, greater<double>> que;
    cin >> n;
    for(i = 0; i < n; i++)
    {
        cin >> a >> b >> c;
        que.push(a);
        que.push(b);
        que.push(c);
        a = que.top();
        que.pop();
        b = que.top();
        que.pop();
        if(pow(que.top(), 2.0) == pow(a, 2.0) + pow(b, 2.0))
           cout << "YES" << endl;
        else
            cout << "NO" << endl;
        que.pop();
    }

    return 0;
}