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>
#define REP(i,n) for(int i=0;i<n;i++)
using namespace std;

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

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

#define REP(i,n) for(int i = 0;i<(int)n;i++)
#define FOR(i,a,b) for(int i = (a);i < (b);i++)
#define RFOR(i,a,b) for(int i = (a);i>(b);i--)

using namespace std;

int main(void){
    
    int number;
    int hen[3];
    int temp;
    cin >> number;
    int judge[200];
    
    REP(i,number)
    {
        REP(i, 3)
        cin >> hen[i];
        REP(i, 2)
        REP(j, 2)
        {
            if(hen[j] < hen[j+1])
            {
                temp = hen[j+1];
                hen[j+1] = hen[j];
                hen[j] = temp;
            }
        }
        if(hen[0]*hen[0] == (hen[1]*hen[1] + hen[2]*hen[2]))
            judge[i] = 1;
        else
            judge[i] = 0;
        
    }
    REP(i, number)
    {
        if(judge[i])
            cout << "YES" << endl;
        else
            cout << "NO" << endl;
    }
  
    
    return 0;
}

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

using namespace std;

bool judge_triangle(double a,double b,double c){
	double d=sqrt(pow(a,2.0)+pow(b,2.0));
	if(d==c) return true;
	else return false;
}

int main(void){
	int i,count;
	double a,b,c;

	cin>>count;

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

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

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

auto main() -> int {
    int nInputs;
    std::cin >> nInputs;

    double lens[3];
    for (int i = 0; i < nInputs; i++) {
        std::cin >> lens[0] >> lens[1] >> lens[2];

        std::sort(std::begin(lens), std::end(lens));
        
        if (std::sqrt(std::pow(lens[0], 2) + std::pow(lens[1], 2)) == lens[2]) {
            std::cout << "YES" << std::endl;
        } else {
            std::cout << "NO" << std::endl;
        }
    }
    return 0;
}

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

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

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<queue>
#include<map>
#include<math.h>
#include<iomanip>
#include<set>
#include<numeric>
#include<cstring>
#include<cstdio>
#include<functional>
#include<bitset>
#include<limits.h>
#include<cassert>
#include<iterator>
#include<complex>
#include<stack>
using namespace std;
typedef  long long int lint;
typedef pair<int, int> P;
typedef pair<lint, lint> LLP;
typedef pair<char, char>CP;
#define rep(i, n) for (int i = 0; i < n; i++)
#define repr(i, n) for (int i = n; i >= 0; i--)
#define sort(v) sort((v).begin(), (v).end())
#define reverse(v) reverse((v).begin(), (v).end())
#define upper(v,hoge) upper_bound(v.begin(),v.end(),hoge)
#define lower(v,hoge) lower_bound(v.begin(),v.end(),hoge)
/*
vector<char>al(26);
al = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
vector<char>AL(26);
AL = {'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'};
vector<char>NUM(10);
	NUM = { '0','1','2' ,'3' ,'4' ,'5' ,'6' ,'7' ,'8' ,'9' };
*/



int main() {
	int N;
	cin >> N;
	int A, B, C;
	rep(i, N) {
		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 <stdio.h>

void right_triangle(int a, int b, int c)
{
    if ((a + b > c) && (a + c > b) && (b + c > a)) {
        printf("YES\n");
    }
    else {
        printf("NO\n");
    }
}

int main(void)
{
    int n, a, b, c;
    scanf("%d", &n);
    for (int i = 0; i < n; ++i) {
        scanf("%d %d %d", &a, &b, &c);
        right_triangle(a, b, c);
    }    
    return 0;
}

C++: #include <iostream>

using namespace std;

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

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

int main() {
	int N;
	cin >> N;
	vector<int> a(3);
	for (int i = 0; i < N; i++) {
		for (int j = 0; j < 3; j++) {
			cin >> a[j];
		}
		sort(a.begin(), a.end());
		for (int j = 0; j < 3; j++) {
			a[j] = pow((double)a[j], 2);
		}
		if (a[0] + a[1] == a[2]) {
			cout << "Yes" << endl;
		}
		else {
			cout << "No" << endl;
		}
		for (int j = 0; j < 3; j++) {
			a[j] = 0;
		}
	}
	return 0;
}

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

bool check_right_triangle(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)
        return true;
    else return false;
}

int main()
{
    const int max_num_of_data = 1000;
    const int min = 1;
    const int max = 1000;
    
    int num_of_data;
    //std::cout << "データ数の入力" << std::endl;
    std::cin >> num_of_data;
    if(num_of_data > max_num_of_data){
        std::cout << "データ数<=" << max_num_of_data << std::endl;
        return 1;
    }
    
    int a, b, c;
    //std::cout << num_of_data << "個の整数データa b cの入力" << std::endl;
    for(int i = 0; i < num_of_data; ++i){
        std::cin >> a >> b >> c;
        if(min <= a && a <= max && min <= b && b <= max && min <= c && c <= max){
            if(check_right_triangle(a, b, c))
                std::cout << "YES" << std::endl;
            else
                std::cout << "NO" << std::endl;
        }else{
            --i;
            std::cout << "整数は" << min <<"以上" << max << "以下に設定" << std::endl;
        }
    }

    return 0;
}