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;
     
    int main() {
    int a,b,c,x=a*a,y=b*b,z=c*c;
    cin>>a>>b>>c;
     
     
    if(x+y==z||x+z==y||y+z==x) {cout<<"YES";}
    else{cout<<"NO";}	
     
    // your code goes here
    	return 0;
    }

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

int main() {
  int n, 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;

bool check_triangle(int a, int b, int c);

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

	return 0;
}

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

C++: #include<stdio.h>
int main(){
	int N,x,y,z,i;
	scanf("%d",&N);
	for(i=0;i<N;i++){
		scanf("%d %d %d",&x,&y,&z);
		x = x^2;
		y = y^2;
		z = z^2;
			if((x+y)==z||(x+z)==y||(y+z)==x){
				printf("YES\n");
			}
			else {
				printf("NO\n");
			}
		}
	return 0;
}

C++: #include <cstdio>
#include <algorithm>

const int MAX_N=1000;

using namespace std;

int a[MAX_N],b[MAX_N],c[MAX_N];

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

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

int main()
{
	priority_queue<int> que;
	int n;
	cin >> n;
	for (int i = 0; i < n; i++)
	{
		int a, b, c;
		for (int j = 0; j < 3; j++)
		{
			cin >> a;
			que.push(a);
		}
		a = que.top();
		que.pop();
		b = que.top();
		que.pop();
		c = que.top();
		que.pop();
		if (a - b < c)
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}
	return 0;
}

C++: #include <stdio.h>
#include <algorithm>
using namespace std;

int main() {
    int n, l[3];
    scanf("%d", &n);
    while(n--) {
        scanf("%d %d %d", &l[0], &l[1], &l[2]);
        sort(l, l + 3);
        if (l[0]*l[0] + l[1]*l[1] == l[2] * l[2]) {
            puts("YES");
        } else {
            puts("NO");
        }
    }
    return 0;
}

C++: #include<stdio.h>

int main()
{
    long int a,b,c,n,cas,i;
    scanf("%d",&cas);
    for(i=0;i<cas;i++){
    scanf("%ld%ld%ld",&a,&b,&c);

        if(a==b&&b==c)
            printf("NO\n");

        else if(a*a+b*b>=c*c)
            printf("YES\n");
        else
            printf("NO\n");
    }
    return 0;

}

C++: #include<iostream>

int a,b,c,n;

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

C++: #include<iostream>

unsigned short a, b, c;
int m;
bool flag;

int main()
{
	std::cin >> m;
	for(int i = 0;i < m;++i)
	{
		std::cin >> a >> b >> c;
		if (a==0||b==0||c==0)
		{
			continue;
		}

		flag = false;
		if((a*a)+(b*b)==(c*c))
		{
			flag = true;
		}
		else if((a*a)+(c*c)==(b*b))
		{
			flag = true;
		}
		else if((b*b)+(c*c)==(a*a))
		{
			flag = true;
		}
		if(flag==false)
		{
			printf("NO\n");
		}
		else
		{
			printf("YES\n");
		}
	}
	return 0;
}

C++: #include<cstdio>
#include<cmath>

using namespace std;

int main(){
  int num;
  scanf("%d",&num);
  for(int i=0;i<num;++i){
    double in1,in2,in3;
    scanf("%lf %lf %lf",&in1,&in2,&in3);
    if(in1==sqrt(in2*in2+in3*in3)||
    in2==sqrt(in1*in1+in3*in3)||
    in3==sqrt(in1*in1+in2*in2)){
      printf("YES\n");
    }else{
      printf("NO\n");
    }
  }
  
  return 0;
}