Go: package main
import (
    "fmt"
    "os"
    "bufio"
    "strconv"
    "sort"
)
 
var sc = bufio.NewScanner(os.Stdin)
var out = bufio.NewWriter(os.Stdout)
 
func main(){
    sc.Split(bufio.ScanWords)
    defer out.Flush()
    n := nextInt()
    for i:=0; i<n; i++{
        data := nextInts(3)
        sort.Ints(data)
        if data[0]*data[0]+data[1]*data[1] == data[2]*data[2]{
            fmt.Fprintln(out, "YES")
        }else{
            fmt.Fprintln(out, "NO")
        }
    }
}
 
func next() string{
    sc.Scan()
    return sc.Text()
}
 
func nextInt() int{
    a, _ := strconv.Atoi(next())
    return a
}
 
func nextInts(n int) []int{
    a := make([]int, n)
    for i:=0; i<n; i++{
        a[i] = nextInt()
    }
    return a
}

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;
    char *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] = "YES";
        else
            judge[i] = "NO";
        
    }
    REP(i, number)
    cout << judge[i] << endl;
    
    return 0;
}

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

int main(){
    std::ios::sync_with_stdio(false);
    std::cin.tie(0);

    int n;
    std::cin >> n;
    for(int i=0; i<n; ++i){
        std::vector<int> e(3);
        for(auto& j : e){
            std::cin >> j;
        }
        std::sort(e.begin(), e.end());
        std::cout << ((e[0]*e[0]+e[1]*e[1]==e[2]*e[2])?"YES":"NO") << "\n";
    }
    return 0;
}

C++: #include<iostream>
#include<math.h>
using namespace std;
int N;
double a, b, c;

void rep(double* x,double* y){
	double d;
	d = *x;
	*x = *y;
	*y = d;
}

int main(){
	
	cin >> N;
	for(int i = 0; i < N; ++i){
		cin >> a >> b >> c;
		
		if(a < b || a < c){
			if(b < c){
				rep(&a, &c);
			}else{
				rep(&a, &b);
			}
		}

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


	}
	return 0;
}

C++: #include <stdio.h>
#include <math.h>	/* ???????????????!! */



int main()
{
    int inputLineSize;
	int i;
	int input_X;
	int input_Y;
	int input_Z;
	int x[1000];
	int y[1000];
	int z[1000];

	scanf("%d", &inputLineSize);
	if(inputLineSize>1000) {
		return 0;
	}
	for(i=0; i < inputLineSize; i++) {
		scanf("%d%d%d", &input_X,&input_Y,&input_Z);
		x[i] = input_X;
		y[i] = input_Y;
		z[i] = input_Z;
	}
	
	for(i=0; i < inputLineSize; i++) {
		if( x[i] > 0 && y[i] > 0 && z[i] > 0) {
			if(pow(x[i],2) + pow(y[i],2) == pow(z[i],2) ) {
        		printf("YES\n");
			} else {
        		printf("NO\n");
			}
		} else {
        	printf("NO\n");
		}
	}

    return 0;
}

C++: #include <iostream>
#include <vector>
#include <string>
#include <sstream>
#include <algorithm>

using namespace std;

int convertToInt(const string& str){
    stringstream ss;
    ss << str;

    int ret;
    ss >> ret;

    return ret;
}

void convertToIntVec(const string& str, vector<int>& ret){
    stringstream ss;
    ss << str;

    int a, b, c;
    ss >> a >> b >> c;

    ret.resize(3);
    ret[0] = a; ret[1] = b; ret[2] = c;
}



void readData(vector<string>& input_data){
    string buff;
    getline(cin, buff);

    int lines = convertToInt(buff);

    for(int i = 0; i < lines; ++i){
        getline(cin, buff);
        input_data.push_back(buff);
    }
}

bool isRightTriangle(vector<int>& edge){
    sort(edge.begin(), edge.end(), [](int a, int b)->bool{ return a < b; });
    return (edge[0]*edge[0] + edge[1] * edge[1] == edge[2] * edge[2]);
}


void mainRoutine(){
    vector<string> input_data;

    readData(input_data);

    for(int i = 0; i < input_data.size(); ++i){
        vector<int> edge;
        convertToIntVec(input_data[i], edge);
        cout << (isRightTriangle(edge) ? "YES" : "NO") << endl;
    }
}


int main(){
    mainRoutine();

    return 0;
}

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 <bits/stdc++.h>
using namespace std;

int N;
int a[3]; 

int main() {
  for (int i = 0; i < N; ++i) {
    scanf("%d %d %d",a[1],a[2],a[3]);
    sort(a,a+3);
    if (a[1]*a[1] + a[2]*a[2] = a[3]*a[3]) {
      printf("%s\n" , YES);
    } else {
      printf("%s\n" , NO);
    }
  }
  
}

C++: #include <stdio.h>
 
int print(void)
{
    if (C == A + B) {
        printf("YES\n");
    } else if (A == B + C) {
        printf("YES\n");
    } else if (B == C + A) {
        printf("YES\n");
    } else {
        printf("NO\n");
    }
}

int main(void)
{
    int i, N, a, b, c, A, B, C;
    scanf("%d", &N);
    for (i = 0; i < N; i++) {
    scanf("%d %d %d\n", &a, &b, &c);
    A = a * a;
    B = b * b;
    C = c * c;
    print();
    }
    return 0;
}

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

int main(){
  int N;
  int a,b,c;
  int n=0;
    
    while(1){

  cin >> N;
    
    if(N <= 0 || N > 1000)
        cout << "この数字ではダメです!!" << endl;
    else
        break;
    }
    
    string x[N];

while(N > 0 && cin >> a >> b >> c){
    
    
    while(1){
        if(a < 1 || a > 1000 || b < 1 || b > 1000 || c < 1 || c > 1000){
            cout << "数字を入力し直してください!!" << endl;
            break;
        }
        
        else{
    if(a+b>c && b+c>a && c+a>b){
        x[n]="YES";
    }
    else{
        x[n]="NO";
    }
            N--;
            n++;
            break;
        }
  }
}
    for(int i = 0;i < n;i++)
        cout << x[i] << endl;
    
  return 0;
}

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

C++: #include<stdio.h>
int main()
{
    int a,b,c,T,i;
    scanf("%d",&T);
    for(i=1;i<=T;i++){

        scanf("%d%d%d",&a,&b,&c);
        if((c*c)==((a*a)+(b*b))||(a*a)==((c*c)-(b*b))||(b*b)==((c*c)-(a*a)))
        {
            printf("YES\n");
        }

        else printf("NO\n");
    }
    return 0;
}

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

int main() {
    int t;
    cin >> t;
    for (int i = 0; i < t; i++) {
        int a, b, c;
        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;
    }
}

C++: #include<iostream>

unsigned short a, b, c;
bool flag;

int main()
{
	while(std::cin>>a>>b>>c)
	{
		flag = false;
		if((a*a)+(b*b)==(c*c))
		{
			flag = true;
		}
		else if((a*a)+(c*c)==(b*b))
		{
			flag = true;
		}
		else if((b*b)+(c*c)==(a*a))
		{
			flag = true;
		}
		if(flag==false)
		{
			printf("NO\n");
		}
		else
		{
			printf("YES\n");
		}
	}
	return 0;
}