Go: package main
import (
        "fmt"
)

func main() {
        var num int
        fmt.Scan(&num)

        for i := 0; i < num; i++ {
                s1 := 0
                s2 := 0
                s3 := 0
                var chk int = 0
                fmt.Scanf("%d %d %d", &s1, &s2, &s3)
                if s1 >= s2 {
                        if s1 > s3 {
                                chk = 1
                        } else {
                                chk = 3
                        }
                } else {
                        if s2 >= s3 {
                                chk = 2
                        } else {
                                chk = 3
                        }
                }

                if (chk == 1 && s1*s1 == s2*s2 + s3*s3) ||
                        (chk == 2 && s2*s2 == s3*s3 + s1*s1) ||
                        (chk == 3 && s3*s3 == s1*s1 + s2*s2) {
                        fmt.Printf("YES\n")
                } else {
                        fmt.Printf("NO\n")
                }
        }
}

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

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

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

static const int DataMax = 1000;	// Max value of elements

typedef struct _triangle
{
    int count;	// Number of elements
    std::vector<int> vec[DataMax];
} triangle_t;

static void inputData(triangle_t& data, int& num)
{
    int v1, v2, v3;

    if (0x00 == &data) {
        std::cerr << "data is null" << std::endl;
        return;
    }

    std::cin >> num;
    for (int i = 0; i < num; i++) {
        std::cin >> v1 >> v2 >> v3;
        data.vec[data.count].push_back(v1);
        data.vec[data.count].push_back(v2);
	data.vec[data.count].push_back(v3);
        data.count++;
    }
}

static bool isRightTriangle(std::vector<int>& vec)
{
    if (0x00 == &vec) {
        std::cerr << "vec is null" << std::endl;
        return false;
    }

    if ((int)pow((double)vec.at(0), 2.0) + (int)pow((double)vec.at(1), 2.0) == (int)pow((double)vec.at(2), 2.0)) {
        return true;
    }

    return false;
}

int main()
{
    triangle_t triangle = {0};
    int num = 0;

    inputData(triangle, num);
    for (int i = 0; i < num; i++) {
        if (true == isRightTriangle(triangle.vec[i])) {
            std::cout << "YES" << std::endl;
        } else {
            std::cout << "NO" << std::endl;
        }
    }

    return 0;
}

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

int main()
{
	int nNum=0;
	cin>>nNum;
	int nIn[3]={0};
	while(nNum--)
	{
		cin>>nIn[0]>>nIn[1]>>nIn[2];
		int nMax=max(max(nIn[0],nIn[1]),nIn[2]);
		if(nMax*2*nMax==nIn[0]*nIn[0]+nIn[1]*nIn[2]+nIn[2]*nIn[2])
		{
			cout<<"YES"<<endl;
		}
		else
		{
			cout<<"NO"<<endl;
		}
	}
	return 0;
}