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>
bool isRight(int a, int b, int c)
{
    //?????§???c??????????????????????????´???
    if (a > c) {
        std::swap(a, c);
    }
    if (b > c){
        std::swap(b, c);
    }
    
    return a * a + b * b == c * c;
}

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

C++: #include<iostream>

using namespace std;

int aa(int x, int y, int z) {

	return (((x ^ 2) + (y ^ 2) == (z ^ 2)) || ((x ^ 2) + (z ^ 2) == (y ^ 2)) || ((y ^ 2) + (z ^ 2) == (x ^ 2)));
}

int main() {

	int a, b[1000], c[1000], d[1000];
	bool e[1000];

	cin >> a;

	for (int i = 1; i <= a; i++)
	{
		cin >> b[i] >> c[i] >> d[i];

		e[i] = aa(b[i], c[i], d[i]);

	}

	for (int i = 1; i <= a; i++)
	{

		cout << ((e[i] != 0) ? "YES" : "NO") << endl;
	}

	return 0;
}

C++: #include<stdio.h>

void handan(int a, int b, int c)
{
	if (a*a == b*b + c*c)
		printf("YES\n");
	else
		printf("NO\n");
}
int main()
{
	int n;
	int a, b, c;

	scanf("%d", &n);
	for (int i = 0; i < n; i++)
	{
		scanf("%d %d %d", &a, &b, &c);
		if (a > b&&b > c)
			handan(a, b, c);
		else if (b > a&&a > c)
			handan(b, c, a);
		else
			handan(c,a,b);
	}
	return 0;
}

C++: #include <iostream>


using namespace std;
 
int main()
{

	int a, b, c, d1, d2, d3;

	while ( 1 ) {
		cin >> a >> b >> c;

		d1 = a * a;
		d2 = b * b;
		d3 = c * c;
	

		if ( d1 == ( b * b ) + ( c * c ) ) {
			cout << "YES" << endl;
		} else if ( d2 == ( a * a ) + ( c * c ) ) {
			cout << "YES" << endl;
		} else if ( d3 == ( a * a ) + ( c * c ) ) {
			cout << "YES" << endl;
		} else {
			cout << "NO" << endl;
		}
	}
	return 0;
}

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

int main(void) {
    int length[3];
    int n;
    
    cin >> n;
    
    for(int i = 0; i < n; ++i) {
        cin >> length[0] >> length[1] >> length[2];
        sort(length, length + 3);
        if(length[0] * length[0] + length[1] * length[1] == length[2] * length[2]) {
            cout << "Yes" << endl;
        } else {
            cout << "No" << endl;
        }
    }
}

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

int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    vector<int> array;
    int a;
    cin >> a;
    array.push_back(a);
    cin >> a;
    array.push_back(a);
    cin >> a;
    array.push_back(a);
    sort(array.begin(), array.end(), greater<int>());
    cout << (array[0] * array[0] == array[1] * array[1] + array[2] * array[2] ? "YES" : "NO") << endl;
  }
}

C++: #include<bits/stdc++.h>
using ll = long long;
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 l[3] = {};
		for(int j = 0; j < 3; j++){
			cin >> l[j];
		}
		bool flag = false;
		for(int j = 0; j < 3; j++){
			//printf("%d %d %d",l[j]*l[j],l[(j+1)%3]*l[(j+1)%3],l[(j+2)%3]*l[(j+2)%3]);
			if(l[j]*l[j] + l[(j+1)%3]*l[(j+1)%3] == l[(j+2)%3]*l[(j+2)%3]){
				flag = true;
				break;
			}
		}
		cout << (flag?"YES":"NO") << endl;
	}

	return 0;
}

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

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  int n,a,b,c;
  cin>>n;
  int d[n];
  for(int i=0;i<n;i++){
    cin>>a>>b>>c;
    if(a*a==(b*b+c*c)){
      d[i]=1;
    }
    else if(b*b==(a*a+c*c)){
      d[i]=1;
    }
    else if(c*c==(a*a+b*b)){
      d[i]=1;
    }
    else{
      d[i]=0;
    }
  }
  for(int i=0;i<n;i++){
    if(d[i]==1){
      cout<<"YES"<<endl;
    }
    else{
      cout<<"NO"<<endl;
    }
  }
}

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

using namespace std;

//input
int a[3];

void solve(){
	sort(a, a + 3);
	if(a[0] * a[0] + a[1] * a[1] == a[2] * a[2])
		printf("YES\n");
	else
		printf("NO\n");
}

int main(int argc, char const *argv[]){
//	freopen("in.txt", "r", stdin);

	int t;
	scanf("%d", &t);
	while(t --){
		for(int i = 0; i < 3; i ++)
			scanf("%d", &a[i]);
		solve();
	}

	return 0;
}

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

bool judge(int x, int y, int z)
{    
    static bool flag = false;
    if (x * x + y * y == z * z){
        flag = true;
    } else if (y * y + z * z == x * x){
        flag = true;
    } else if (z * z + x * x == y * y){
        flag = true;
    }
    return flag;
}


int main(void)
{
    int repeat, a, b, c;
    scanf("%d", &repeat);
    for (int i = 0; i < repeat ; ++i){
        scanf("%d %d %d", &a, &b, &c); 
        bool flag = judge (a, b, c); 
        if (flag == true){    
            printf("YES\n");
        }else{	
            printf("NO\n");
        }
    }
    return 0;        
}

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

using namespace std;

int main() {
    int i,j,n,a,b,c;

    cin >> n;

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

        if(a == double(sqrt(pow(b,2) + pow(c,2)))){
            cout << "Yes" << endl;
        }

        else if(b == double(sqrt(pow(a,2) + pow(c,2)))){
            cout << "Yes" << endl;
        }

        else if(c == double(sqrt(pow(a,2) + pow(b,2)))){
            cout << "Yes" << endl;
        }

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

    return 0;
}

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

bool check(int a, int b , int c){
	if((a * a) == (b * b + c * c) ){ 
		return true ; 
	}
	return false ;
}

int main(){
	int i, a, b, c;

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

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

int main() {
  int ct = 0;
  vector<int> v(3);
  queue<bool> q;

  scanf("%d", &ct);
  for(int i = 0; i < ct; i++) {
    scanf("%d %d %d", &v[0], &v[1], &v[2]);
    sort(v.begin(), v.end());
    q.push(v[2] * v[2] == v[0] * v[0] + v[1] * v[1] ? true : false);
    v.clear();
  }
  for(int i = 0; i < ct; i++) {
    printf("%s\n", q.front() == true ? "YES" : "NO");
    q.pop();
  }
  return 0;
}