Go: package main

import (
  "fmt"
)


func main() {
  var a int
  var b int
  var c int
  var n int
  fmt.Scan(&n)
  for _, err := fmt.Scan(&a, &b, &c); err == nil; _, err = fmt.Scan(&a, &b, &c) {
    if a*a == b*b+c*c {
      fmt.Println("YES")
    } else if b*b == c*c+a*a {
      fmt.Println("YES")
    } else if c*c == a*a+b*b {
      fmt.Println("YES")
    } else {
      fmt.Println("NO")
    }
  }
}

C++: #include <stdio.h>

int weather_right_triangle(int, int, int);

int main(void)
{
	int n;
	scanf("%d", &n);
	int a[n][3];
	for (int i = 0; i < n; i++) {
		scanf("%d %d %d", &a[i][0], &a[i][1], &a[i][2]);
		weather_right_triangle(a[i][0], a[i][1], a[i][2]);
	}
	return 0;
}

int weather_right_triangle(int a, int b, int c)
{
	if (a * a + b * b == c * c || 
		b * b + c * c == a * a || 
		a * a + c * c == b * b) {
		printf("YES\n");
	} else {
		printf("NO\n");
	}
	return 0;
}

C++: #include <iostream>

int N;
int x, y, z;

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

    for(int i = 0; i<N; ++i) {
        int a = std::min(x, std::min(y, z));
        int c = std::max(x, std::max(y, z));
        int b = (x + y + z) - (a + c);

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

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

int main(){

int tri[1000][3];
int num = 0;
cin >> num;
for(int i = 0;i<num;i++)
cin >> tri[i][0] >> tri[i][1] >> tri[i][2];

long int a,b,c=0;

for(int i = 0;i<num;i++){
a = tri[i][0]*tri[i][0];
b = tri[i][1]*tri[i][1];
c = tri[i][2]*tri[i][2];
if(a == b+c || b == a+c || c == a + b)
cout << "YES\n";
else
cout << "NO\n";
}
    return 0;
}

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

int main() {
    clock_t cTimeStart, cTimeEnd;
    cTimeStart = clock();           // 現在時刻
    int H[3];
    int N,total;
    cin>>N;
    for(int i=0;i<N;++i){
    	cin>>H[0]>>H[1]>>H[2];
    	sort(H,H+3);
    	total=H[2]*H[2]-(H[1]*H[1]+H[0]*H[0]);
    	if(total==0){
    		cout<<"YES"<<endl;
    	}else{
    		cout<<"NO"<<endl;

    	}
    }

    cTimeEnd = clock();           // 現在時刻
//    cout<< "処理時間:" <<(cTimeEnd - cTimeStart)/1000 << "[ms]" << endl;

	return 0;
}

C++: #include <stdio.h>

enum {YES, NO} yn;

int tri_judge(int x, int y, int z);
int pow2(int x);

int main(void)
{
    int dataset;
    scanf("%d", &dataset);

    int side1, side2, side3;
    while (dataset--){
        scanf("%d %d %d", &side1, &side2, &side3);
        yn = tri_judge(side1, side2, side3);
        if (yn == YES){
            printf("YES\n");
        } else {
            printf("NO\n");
        }

    }

    return 0;
}

int tri_judge(int x, int y, int z)
{
    if (pow2(x) == pow2(y) + pow2(z)){
        yn = YES;
    } else if (pow2(y) == pow2(z) + pow2(x)){
        yn = YES;
    } else if (pow2(z) == pow2(x) + pow2(y)){
        yn = YES;
    } else {
        yn = NO;
    }

    return yn;
}

int pow2(int x)
{
    return x * x;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
	int n;
	int a[3];
	cin>>n;
	for(int i=0;i<n;i++){
	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;
	}
	}
}

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]){
			printf("YES\n");
		}else{
			printf("NO\n");
		}
	}
	return 0;
}

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

using namespace std;

int main(){
	int iMax;
	cin >> iMax;
	for (int i = 0; i < iMax; ++i){
		vector<int> x;
		int t;
		for (int j = 0; j < 3; ++j){
			cin >> t;
			x.push_back(t);
		}
		sort(x.begin(), x.end());
		if (pow(x[0], 2)+pow(x[1], 2) == pow(x[2], 2)){
			cout << "YES" << endl;
		} else{
			cout << "NO" << endl;
		}
	}
	
	return 0;
}

C++: #include <cstdio>

using namespace std;

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

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 <iostream>
#include <algorithm>

using namespace std;

int main(void){
	int n , a[3];
	cin >> n;
	for (int i=0; i<n; i++){
		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 <iostream>
using namespace std;

int main()
{
	int iCount, ia, ib, ic;
	int iTrueFlag[1000];

	cin >> iCount;

	for( int i=0;i<iCount;i++ ){
		cin >> ia >> ib >> ic;

		if( (ia * ia) + (ib * ib) == (ic * ic) )
			iTrueFlag[i] = 1;
		else
			iTrueFlag[i] = 0;
	}

	for( int i=0;i<iCount;i++ ){
		if( iTrueFlag[i] == 1 )
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}

	return 0;
}

C++: #include <iostream>

void checkTringle(int a,int b,int c){
    if(a^2==b^2+c^2){
        std::cout << "YES" << std::endl;
    }else{
        std::cout << "NO" << std::endl;
    }
}

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

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

        if(a>b){
            if(a>c){
                checkTringle(a,b,c);
            }else{
                checkTringle(c,a,b);
            }
        }else{
            if(b>c){
                checkTringle(b,c,a);
            }else{
                checkTringle(c,a,b);
            }
        }
    }
}

C++: #include <iostream>
#include <math.h>
#include <stdio.h>
#include <string>
#include <string.h>
#include <algorithm>
#include <cmath>
#include <limits>
#include <sstream>

using namespace std;

int main (void)
{
	int n,a[3];

	cin >> n;

	for (int j = 0; j < n; j++)
	{
		for (int i = 0; i < 3; i++)
		{
			cin >> a[i];
		}

		sort (a,a + 3);

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

C++: #include<stdio.h>


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

	}
	return 0;
}

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

int main()
{
	using namespace std;
	int n;
	cin >> n;

	for (int i = 0; i < n; i++)
	{
		auto square = [](unsigned x) {return x * x; };

		vector<unsigned> sides(3, 0);
		cin >> sides[0] >> sides[1] >> sides[2];
		sort(sides.begin(), sides.end());


		if (square(sides[0]) + square(sides[1]) == square(sides[2]))
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}
}

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