Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
	"strconv"
)

var sc = bufio.NewScanner(os.Stdin)

func read() string {
	sc.Scan()
	return sc.Text()
}

func main() {
	// sc.Split(bufio.ScanLines)
	sc.Split(bufio.ScanWords)
	n, _ := strconv.Atoi(read())
	s := make([]int, 3)
	for i := 0; i < n; i++ {
		s[0], _ = strconv.Atoi(read())
		s[1], _ = strconv.Atoi(read())
		s[2], _ = strconv.Atoi(read())
		sort.Sort(sort.IntSlice(s))
		if (s[2] * s[2]) == ((s[0] * s[0]) + (s[1] * s[1])) {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

C++: #include <iostream>
#include <fstream>
#include <string>
#include <cmath>
#include <cstdlib>

int main(int argc, char *argv[]){
	//std::ifstream datafile(argv[1]); //input datafile
	std::string str;
	int num[3] = {}; //a, b, c
	int N; //N
	int tmp;

	// if(datafile.fail()){
	// 	std::cout << "error : can't open this file." << std::endl;
	// 	exit(1);
	// }

	//read N
	std::getline(std::cin, str);
	sscanf(str.c_str(), "%d", &N);

	if(N < 0 || N > 1000){
		std::cout << "error : out of constraints" << std::endl;
		exit(1);
	}

	//read dataset
	while(std::getline(std::cin, str)){
		sscanf(str.c_str(), "%d%d%d", &num[0], &num[1], &num[2]);

		for(size_t i = 0; i < 3; i++){
			if(num[i] < 1 || num[i] > 1000){
				std::cout << "error : out of constraints" << std::endl;
				exit(1);
			}
		}

		//bubble sort
		for(size_t i = 0; i < 2; i++){
			for(size_t j = 2; j > i; j--){
				if(num[j-1] > num[j]){
					tmp = num[j-1];
					num[j-1] = num[j];
					num[j] = tmp;
				}
			}
		}

		//Pythagorean theorem
		if(std::pow(num[2], 2) == std::pow(num[0], 2) + std::pow(num[1], 2)){
			std::cout << "YES" << std::endl;
		}else{
			std::cout << "NO" << std::endl;
		}
	}

	return 0;
}

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

int main(){
  int n;
  int a[3];
  cin >> n;

  for(int i=0;i<n;i++){
    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<string>
using namespace std;
int main(){
	int n,a,b,c;
	cin>>n;
	for(int i=0;i<n;i++){
		bool t=false;
		cin>>a>>b>>c;
		if(a*a+b*b==c*c)
			t=true;
		if(a*a+c*c==b*b)
			t=true;
		if(b*b+c*c==a*a)
			t=true;
		if(t==true)
			cout<<"YES"<<endl;
		else
			cout<<"NO"<<endl;
	}
	return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
int n;
cin >> n;
int a[3];
while(cin >>a[0]>>a[1]>>a[2]){
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 <stdio.h>
int main(){

  int n,a,b,c,i,blank;

  scanf("%d",&n);

  for(i = 0; i < n; i++){

    scanf("%d %d %d",&a,&b,&c);

    if(a > b){

      blank=a;
      a=b;
      b=blank;

    }

    if(b > c){

      blank=b;
      b=c;
      c=blank;

    }

    if(a > b){

      blank=a;
      a=b;
      b=blank;

    }

    if(c*c == a*a+b*b) printf("YES\n");
    else printf("NO\n");

  }

  return 0;

}

C++: #include <stdio.h>
#include <math.h>
int main(void) {
	int a, b, c, t, x, y, z;
	
	scanf("%d %d %d",&a,&b,&c);
	
	t = a ; x = b ; y = c; 
	if(t<=b){
		t = b ; x = c ; y = a ;
	}
	if(t<=c){
		t = c ; x = a ; y = b ;
	}
	t = pow(t,2) ;x = pow(x,2); y = pow(y,2); z = sqrt((x+y));

	if(t==z){
		printf("YES");
	}
	else{
		printf("NO");
	}
	return 0;
}

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

using namespace std;

int main(){
	int n,a,b,c;
	int m=0;
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		int a[3];
		for(int j=0;j<3;j++)scanf("%d",&a[j]);
		std::sort(a,a+3);
		
		int d = 20;
		if(a[0]>d || a[1]>d || a[2]>d)puts("hogehogehoge");
		
		if(a[0]*a[0]+a[1]*a[1] == a[2]*a[2]){
			puts("YES");
		}else{
			puts("NO");
		}
	}
}

C++: #include <iostream>

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 * a == b * b + c * c) || (b * b == c * c + a * a) || (c * c == a * a + b * b) ) {
			cout << "YES" << endl;
		} else {
			cout << "NO" << endl;
		}
	}
	return 0;
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <algorithm>
#include <sstream>
#include <cmath>
#include <set>
#include <cstdio>

using namespace std;

#define REP(i,n) for(int (i)=0;(i)<(int)(n);(i)++)
#define RREP(i,n) for(int (i)=(int)(n)-1;(i)>=0;(i)--)
#define REMOVE(Itr,n) (Itr).erase(remove((Itr).begin(),(Itr).end(),n),(Itr).end())
#define PB_VEC(Itr1,Itr2) (Itr1).insert((Itr1).end(),(Itr2).begin(),(Itr2).end())
#define UNIQUE(Itr) sort((Itr).begin(),(Itr).end()); (Itr).erase(unique((Itr).begin(),(Itr).end()),(Itr).end())

typedef long long ll;

int main(){
    
    int N;
    cin>>N;
    
    REP(i,N){
        int a,b,c;
        cin>>a>>b>>c;
        if(a*a==b*b+c*c)cout<<"YES"<<endl;
        else if(b*b==a*a+c*c)cout<<"YES"<<endl;
        else if(c*c==a*a+b*b)cout<<"YES"<<endl;
        else cout<<"NO"<<endl;
    }
    
    return 0;
}

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

using namespace std;

int main()
{
	int n;
	scanf("%d", &n);
	
	for(int i=0 ; i<n ; ++i){
		int a[3];
		scanf("%d%d%d", &a[0], &a[1], &a[2]);
		sort(a, a+3);
		puts((a[0]*a[0] + a[1]*a[1] == a[2]*a[2]) ? "YES" : "NO");
	}
	return 0;
}

C++: #include <stdio.h>
 
int triJudgefunc(int x, int y, int z);
 
int main(void)
{
    int row;
    scanf("%d", &row);
    for (int i = 0; i < row; ++i) {
        int firstn, secondn ,thirdn; 
        scanf("%d %d %d", &firstn, &secondn, &thirdn);
        if (triJudgefunc(firstn, secondn, thirdn) = true) {
        printf("YES\n");
        } else {
        printf("NO\n");
        }
    }
    return 0;
}
 
 
 
int triJudgefunc(int x, int y, int z)
{
    double maxlength, notmax1, notmax2;
    if (x > y) {    //x > y
        if (x > z) {
            maxlength = x, notmax1 = y, notmax2 = z;    //x???max
        } else {
            notmax1 = x, notmax2 = y, maxlength = z;    //z???max
        }
    } else {    //y > x
        if (y > z) {
            notmax1 = x, maxlength = y, notmax2 = z;    //y???max
        } else {
            notmax1 = x, notmax2 = y, maxlength = z;    //z???max
        }
    }
    double result = maxlength * maxlength - notmax1 * notmax1 - notmax2 * notmax2;
    return result;
}

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

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


int main(){
	int i;
	deque<int> nums;

	cin >> i;

	for(int j=0; j<i; j++){
		int a,b,c;
		cin >> a >> b >> c;

		nums.push_front(a);
		nums.push_front(b);
		nums.push_front(c);

		sort(nums.begin(), nums.end());

		a = nums[0];
		b = nums[1];
		c = nums[2];

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

	}

	return 0;
}

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

C++: #include <iostream>
using namespace std;
int main(){
	int a,b,c,n;
	cin>>n;
	for(int i=1;i<=n; i++){
		cin>>a>>b>>c;
		if(a*a+b*b==c*c){
			cout<<"Yes"<<endl;
		}else{
			cout<<"No"<<endl;
		}
	}

}