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 <algorithm>

int main() {
    int t; std::cin >> t;
    for (int i=0; i<t; i++) {
        int a[3];
        std::cin >> a[0] >> a[1] >> a[2];
        std::sort(std::begin(a), std::end(a));
        if (a[0] * a[0] + a[1] * a[1] == a[2] * a[2]) {
            std::cout << "YES" << std::endl;
        } else {
            std::cout << "NO" << std::endl;
        }
    }
}

C++: #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define shosu(n) setprecision(n)
#define INF 1000000000;
using namespace std;
int main() {
  int N, n[3];
  cin >> N;
  for (int i; i < N; i++) {
    rep(i, 3) cin >> n[i];
    sort(n, n + 3);
    if (n[0] * n[0] + n[1] * n[1] - n[2] * n[2] == 0)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}

C++: #include<stdio.h>
int main()
{
    int N,a,b,c;
    scanf("%d%d%d",&a,&b,&c);
    N=a,b,c;
    if(a>=1 && a<=1000)
    if(b>=1 && b<=1000)
    if(c>=1 && c<=1000)
        if((a+b)<c)
            printf("YES");
        else if((b+c)<a)
            printf("YES");
        else if((c+a)<b)
            printf("YES");
        else
            printf("NO");
    return 0;

}

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

int main() {
    int n;
    cin >> n;
    for (int i = 0; i < n; i++) {
        array<int, 3> a;
        cin >> a[0] >> a[1] >> a[2];
        sort(a.begin(), a.end());
        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>
 #include<stdio.h>
 #include<string>
 #include<math.h>
 #include<iomanip>
 #include<algorithm>
 #include<string.h>
 #include<cctype>
 #include<map>
 #include<set>
 #include<vector>
 #include<sstream>
 
 using namespace std;
 
 int compare(int a,int b)
 {
   return a>b;    
 }

 int main()
 {
   int num;
   int arr[3];
   cin>>num;
   while(num--)
   {
     for(int i=0;i<3;i++) cin>>arr[i];
     sort(arr,arr+3);
     if(pow(arr[0],2)+pow(arr[1],2)==pow(arr[2],2)) cout<<"YES"<<endl;
     else cout<<"NO"<<endl;              
   }
   //while(1);      
   return 0;    
 }

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

using namespace std;

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

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

bool checkRightTriangle(int side1, int side2, int side3) {
  std::vector<int> edges;
  edges.push_back(side1);
  edges.push_back(side2);
  edges.push_back(side3);
  std::sort(edges.begin(), edges.end(), std::greater<int>());
  if (edges[0] > edges[1] + edges[2]) {
    return false;
  } else {
    return true;
  }
}

int main(int argc, char const *argv[]) {
  int data_num;
  std::cin >> data_num;

  int a, b, c;
  std::vector<bool> results;

  for (size_t i = 0; i < data_num; i++) {
    std::cin >> a >> b >> c;
    results.push_back(checkRightTriangle(a, b, c));
  }

  for (bool result : results) {
    if (result) {
      std::cout << "YES" << '\n';
    } else {
      std::cout << "NO" << '\n';
    }
  }
  return 0;
}

C++: #include<iostream>

using namespace std;

int main()
{
	int N, s1, s2, s3;

	while(cin >> N)
	{
		while(N--)
		{
			cin >> s1 >> s2 >> s3;
			if(s1*s1 + s2*s2 == s3*s3 || s1*s1 + s3*s3 == s2*s2 || s3*s3 + s2*s2 == s1*s1)
				cout << "YES\n";
			else
				cout << "NO\n";
		}
	}
	return 0;
}

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

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

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

int main() {
    int n;
    cin >> n;
    for (int i = 0; i < n; i++) {
        int a[5];
        for (int j = 0; j < 3; j++) cin >> a[j];
        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>
#include <array>

bool checkTriangle(int a, int b, int c)
{
	if((a >= b) && (a >= c)) {
		return (a*a == (b*b + c*c));
	} else if((b >= a) && (b >= c)) {
		return (b*b == (a*a + c*c));
	} else {
		return (c*c == (a*a + b*b));
	}
}

int showResult(int a, int b, int c)
{
	if(checkTriangle(a,b,c)) {
		std::cout << "Yes" << std::endl;
	} else {
		std::cout << "No" << std::endl;
	}
	return 0;
}
	
int main()
{
	int N = 0;
	std::array<int, 1000>t1;
	std::array<int, 1000>t2;
	std::array<int, 1000>t3;
	std::cin >> N;
	
	if(N == 0) {
		return 0;
	}
	for(int i = 0; i < N; i++) {
		std::cin >> t1.at(i) >> t2.at(i) >> t3.at(i);
	}
	std::cout << std::endl;
	for(int i = 0; i < N; i++) {
		showResult(t1.at(i), t2.at(i), t3.at(i));
	}
	return 0;	
}

C++: #include <iostream>

using namespace std;

int main() {
	int count;
	cin >> count;
	
	while(count-- >0){
		int t[3];
		for(int i=0;i<3;i++){
			cin >> t[i];
		}
		if(((t[0]*t[0])==((t[1]*t[1])+(t[2]*t[2]))) || ((t[1]*t[1])==((t[0]*t[0])+(t[2]*t[2]))) || ((t[2]*t[2])==((t[1]*t[1])+(t[0]*t[0])))){
			cout << "YES" <<endl;
		}else{
			cout << "NO" << endl;
		}
	}
	return 0;
}

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

int main(){
	for (int x = 0; x < 82;)
	{
		int a = 0;
		int b = 0;
		int c = 0;
		int d = a*a;
		int e = b*b;
		int f = c*c;
		cin >> a >> b >> c;
		if (d + e == f)
		{
			cout << "YES" << endl;
		}
		else if (d + f == e)
		{
			cout << "YES" << endl;
		}
		else if (e + f == d)
		{
			cout << "YES" << endl;
		}
		else
		{
			cout << "NO" << endl;
		}



	}
	getchar();
	getchar();
	return 0;
}

C++: #include <iostream>

using namespace std;

int main(void)
{
	int i;
	int a[3];

	for(i = 0; i < 3; i++){
		cin >> a[i];
	}
	a[0] = a[0]^2;
	a[1] = a[1]^2;
	a[2] = a[2]^2;

	if((a[0] == (a[1] + a[2])) || (a[1] == (a[0] + a[2])) || (a[2] == (a[0] + a[1]))){
		cout << "OK " << endl;
	}
	else{
		cout << "NO" << endl;
	}
	return 0;
	
}

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