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 <iostream>
using namespace std;

int main(){
  int n;

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

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

  return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
	int n,edge[3];
	cin >>n;
	for(int i=0; i<n; i++){
		cin >>edge[0] >>edge[1] >>edge[2];
		for(int l=0; l<3; l++){
			for(int m=0 ;m<2 ;m++){
				if(edge[m]<edge[m+1]){
					int c = edge[m];
					edge[m] = edge[m+1];
					edge[m+1] = c;
				}
			}
		}
		for(int l=0; l<3; l++){edge[l]=edge[l]*edge[l];}
		if(edge[0] == edge[1]+edge[2]){cout <<"YES"<<endl;}
		else{cout<<"NO"<<endl;}
	}
	return 0;
}

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

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

bool check_right_triangle(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)
        return true;
    else return false;
}

int main()
{
    const int max_num_of_data = 1000;
    const int min = 1;
    const int max = 1000;
    
    int num_of_data;
    //std::cout << "データ数の入力" << std::endl;
    std::cin >> num_of_data;
    if(num_of_data > max_num_of_data){
        std::cout << "データ数<=" << max_num_of_data << std::endl;
        return 1;
    }
    
    int a, b, c;
    //std::cout << num_of_data << "個の整数データa b cの入力" << std::endl;
    for(int i = 0; i < num_of_data; ++i){
        std::cin >> a >> b >> c;
        if(min <= a && a <= max && min <= b && b <= max && min <= c && c <= max){
            if(check_right_triangle(a, b, c)
                std::cout << "Yes" << std::endl;
            else
                std::cout << "No" << std::endl;
        }else{
            --i;
            std::cout << "整数は" << min <<"以上" << max << "以下に設定" << std::endl;
        }
    }

    return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
    int a,x,y,z;
    cin >> a;
    int m[3][a];
    for (int i=0;i<a;i++){
        cin >> x >> y >> z ;
        m[0][i] = x;
        m[1][i] = y;
        m[2][i] = z;
    }
    for (int j=0;j<a;j++){
        if (m[0][j]^2+m[1][j]^2!=m[2][j]^2 && m[0][j]^2+m[2][j]^2!=m[1][j]^2 && m[1][j]^2+m[2][j]^2!=m[0][j]^2)
            cout << "NO" << endl;
        else
            cout << "YES" << endl;
    }
}

C++: #include <stdio.h>

int main(){

	int N = 0, a=0, b=0, c=0,i;

	scanf("%d",&N);
	for (i = 0; i < N; i++){
		scanf("%d %d %d", a, b, c);
		if (a*a + b*b == c*c){
			printf("YES\n");
		}
		else if (a*a + c*c == b*b){
			printf("YES\n");
		}
		else if (b*b + c*c == a*a){
			printf("YES\n");
		}
		else{
			printf("NO\n");
		}
	}return 0;
}

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

using namespace std;

int main(void)
{
	int nam;
	int a,b,c;
	string str;
	cin >> nam;
	for(int i=0;i<nam;i++)
	{
		cin>>a>>b>>c;
		if( (a*a + b*b) == (c*c) || (a*a + c*c) == (b*b) || (b*b + c*c) == (a*a) )
		{
			str += "YES\n";
		}
		else
		{
			str += "NO\n";
		}
	}
	cout<<str;
	return 0;
}

C++: #include<stdio.h>


int main(){
	int N = 0 ,i,j,k,cheak = 0,tmp = 0;
	int tri[2];
	scanf("%d",&N);
	for(i=0;i<=N;i++){
		scanf("%d %d %d",&tri[0],&tri[1],&tri[2]);
		for(j = 0;j <= 2;j++){
			for(k = j + 1;k <= 2;k++){
				tmp = tri[j];
				tri[j] = tri[k];
				tri[k] = tmp;
			}
		}
		if(tri[0] * tri[0] == tri[1] * tri[1] + tri[2] * tri[2]){printf("YES\n");}
		else{printf("NO\n");}
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
int i,j,d,k,n1,n2,n3,temp;
 int l[3];

int rt()
{
//入力
cin >> n1 >> n2 >> n3;
while(n1 < 1 or n1 > 1000 or n2 < 1 or n2 >1000 or n3 < 1 or n3 > 1000){
cin >> n1 >> n2 >> n3;
}
if(n1 >= 1 and n1 <= 1000 and n2 >= 1 and n2 <=1000 and n3 >= 1 and n3 <= 1000){
       l[0]=n1;
       l[1]=n2;
       l[2]=n3;
        for (i = 0; i < 2; i++) {
        for (j = 2; j > i; j--) {
            if (l[j - 1] > l[j]) {  
                temp = l[j];  
                l[j] = l[j - 1];
                l[j - 1] = temp;
            }
        }
    }
 }
    if(l[2]*l[2] == (l[1]*l[1]+l[0]*l[0])){
    cout << "YES\n";
    }else{
    cout << "NO\n";
    }
}



int main(){

   cin >> d;
   while(d < 1 or d > 1000){
       cin >> d;
   }

for(k=0;k<d;k++){
    rt();
}

    return 0;
}

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

C++: #include <bits/stdc++.h>
#define rep(i, a, n) for(int i = a; i < n; i++)
#define repb(i, a, b) for(int i = a; i >= b; i--)
#define all(a) a.begin(), a.end()
#define int long long
using namespace std;
typedef pair<int, int> P;

signed main(){
	int n;
	cin >> n;
	rep(i, 0, n){
		int a[3];
		rep(j, 0, 3) 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;
		}
	}
}

C++: #include<iostream>
#include<algorithm>
#include<string>
#include<math.h>
using namespace std;

int keta(int x){
	int i=0;
	while (x/pow(10,i)>=1){
		i++;
	}
	if (x==0){
		return 1;
	}
	else
	return i;
	}


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

C++: #include<stdio.h>

int main(){
	int a;
	scanf("%d",&a);
	while(a--){
		int b,c,d;
		scanf("%d%d%d",&b,&c,&d);
		int max=b;
		if(b<c)max=c;
		if(max<d)max=d;
		if(max*max==b*b+c*c+d*d-max*max)printf("YES\n");
		else printf("NO\n");
	}
}

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

string heihou(unsigned int a,unsigned int b,unsigned int c)
{
	if (a*a == b*b + c*c || b*b == a*a + c*c || c*c==a*a+b*b){
		return "YES";
	}
	else{
		return "NO";
	}
}
int main()
{
	unsigned int dataset[999][2];
	int i = 0;
	int l;
	cin >> l;
	while (i<l){
		cin >> dataset[i][0] >> dataset[i][1] >> dataset[i][2]; 
		i++;
	}
	for (int j = 0; j < i; j++){
		cout << heihou(dataset[j][0], dataset[j][1], dataset[j][2])<< endl;
	}
	return 0;
}