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>			//std::cout, std::cin
#include <string>			//std::string,std::to_string(C++11)
#include <vector>			//std::vector
#include <valarray>			//std::valarray
#include <algorithm>		//std::sort
#include <ctime>			//localtime_s
#include <cstdlib>			//abs
#include <cmath>			//abs,std::pow,sqrt,sin,cos,round,floor,ceil
#include <fstream>			//std::ifstream,std::ofstream
#include <iomanip>			//std::setprecision,std::setw,std::setfill
#include <random>			//std::random(C++11)
#include <numeric>			//std::accumulate
#include <functional>		//std::greater
#include <chrono>			//std::chrono(C++11)
#include <bitset>			//std::bitset
#include <queue>			//std::queue

const static double	de_PI	= 3.14159265358979323846;
const static int	de_MOD	= 1000000007;
const static int	de_MAX	= 999999999;

int main(void) {

	//std::ifstream in("123.txt");	std::cin.rdbuf(in.rdbuf());
	//std::ofstream ofs("456.csv");
	//std::chrono::system_clock::time_point t_st = std::chrono::system_clock::now();

	int N = 0;
	std::cin >> N;
	std::vector<bool> A(N,false);

	for (int i = 0; i < N; i++) {
		std::vector<int> n(3);
		std::cin >> n[0] >> n[1] >> n[2];
		std::sort(n.begin(), n.end());
		if (n[2] * n[2] == n[0] * n[0] + n[1] * n[1]) {
			A[i] = true;
		}
	}

	for (int i = 0; i < N; i++) {
		if (A[i]) {
			std::cout << "YES" << std::endl;
		}
		else {
			std::cout << "NO" << std::endl;
		}
	}

	//std::chrono::system_clock::time_point t_ed = std::chrono::system_clock::now();
	//std::cout << std::chrono::duration_cast<std::chrono::milliseconds>(t_ed - t_st).count() << "ms" << std::endl;

}

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

C++: #include <iostream>

using namespace std;

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

int main(int argc, const char * argv[])
{

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

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

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

	cin >> N;
	
	for(int i = 0; i < N; i++){
		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;
	}
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
    int n;
    int a,b,c;

    cin >> n;

    for(int i=0; i<n;++i ){
        cin >> a >> b >> c;
        if(a < b){
            swap(a,b);
        }
        if(a < c){
            swap(a,c);
        }

        if((a*a) != (b*b + c*c)){
            cout << "NO" << endl;
        }
        else{
            cout << "YES" << endl;
        }
    }

    return 0;
}

C++: #include<iostream>
#include <algorithm>
using namespace std;
int main() {
    int a[3];
	for(int j=0;j<3;j++) std::cin>>a[j];
    std::sort(a, a + 3);             
	a[0]*=a[0];
	a[1]*=a[1];
	a[2]*=a[2];
	if(a[0]+a[1]==a[2]){
	std::cout<<"YES";
	}else{std::cout<<"NO";}
	return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
	int n, a, b, c;
	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) || (b * b) + (a * a) == (c * c)){
				cout << "YES" << endl;
			}
			else{
				cout << "NO" << endl;
			}
	}
	return(0);
}

C++: #include <iostream>
using namespace std;
 
int main()
{
   int a,b,c,x, y, z,n;
 
   // read in n 
   cin>>n;

   // for n set of data, read into 3 sides 
   
   for(int i=0;i<=n;i++)
   {
      cin>>a>>b>>c;          
      x=a*a; y=b*b; z=c*c;
      
      // check if they are triangle
      if(x+y==z||x+z==y||y+z==x)
          cout<<"Yes"<<endl;
      else
          cout<<"No"<<endl;
    }   
    return 0;
}

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

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

C++: /*
    AOJ Volume0 0003

        Is it a Right Triangle?

        Write a program which judges wheather given length of three side form a right triangle.
        Print "YES" if the given sides (integers) form a right triangle, "NO" if not so.
        
        Input
            Input consists of several data sets. In the first line, the number of data set, N is given.
            Then, N lines follow, each line corresponds to a data set.
             A data set consists of three integers separated by a single space.

        Constraints
            1 ≤ length of the side ≤ 1,000
            N ≤ 1,000

        Output
            For each data set, print "YES" or "NO".

        Sample Input
            3
            4 3 5
            4 3 6
            8 8 8

        Output for the Sample Input
            YES
            NO
            NO
*/

#include <iostream>


bool is_right_triangle(int edge1, int edge2, int edge3)
{
    int edge[3] = { edge1, edge2, edge3 };
    int longest = 0;
    int other1 = 1, other2 = 2;

    for(int i=1; i<3; ++i)
    {
        if(edge[i] > edge[longest])
        {
            longest = i;
            if(longest == 1){ other1 = 0; other2 = 2; }
            if(longest == 2){ other1 = 0; other2 = 1; }
        }
    }

    int aa = edge[other1] * edge[other1];
    int bb = edge[other2] * edge[other2];
    int cc = edge[longest] * edge[longest];

    return aa + bb == cc;
}


int main(void)
{
    int N;
    std::cin >> N;

    for(int i=0; i<N; i++)
    {
        int e, f, g;
        std::cin >> e >> f >> g;

        bool ans = is_right_triangle(e,f,g);
        std::cout << (ans ? "YES" : "NO") << std::endl;
    }

    return 0;
}

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

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

  return 0;
}