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 a, b, c, N;

	cin >> N;
	
	for(int i = 0; i < 3; i++){
		cin >> a >> b >> c; 
		if(a*a + b*b == c*c || a*a + c*c == b*b || b*b + c*c == a*a){
			cout << "YES" << endl;
		}
		else cout << "NO" << endl;
	}
}

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

C++: #include <cstdio>
int main(){
 int n,a,b,c;
 scanf("%d",&n);
 while(n>0){
  scanf("%d %d %d",&a,&b,&c);
  m=a>b?(a>c?a:c):(b>c?b:c);
  if (a*a+b*b+c*c==2*m*m) printf("YES\n")
  else printf("NO\n");
  --n;
 };
 return 0;
};

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

int main(){

int i,j,d,n1,n2,n3,k,temp;



   cout << "データセットの数を入力してください。(データセットの数 <= 1000):";
   cin >> d;
   while(d <= 0 or d >= 1000){
       cout << "データセットの数 <= 1000を満たしておりません。もう一度入力してください。\n";  
       cout << "データセットの数を入力してください。(データセットの数 <= 1000):";
       cin >> d;
   }
 

 
 int l[d][3];
 

//入力
for(i=0; i<d; i++){
   cin >> n1 >> n2 >> n3;
   
   if(n1 >= 1 and n1 <= 1000 and n2 >= 1 and n2 <=1000 and n3 >= 1 and n3 <= 1000){
       l[i][0]=n1;
       l[i][1]=n2;
       l[i][2]=n3;
        for (k = 0; k < 2; k++) {
        for (j = 2; j > k; j--) {
            if (l[j - 1] > l[j]) {  
                temp = l[i][j];  
                l[i][j] = l[i][j - 1];
                l[i][j - 1] = temp;
            }
        }
    }
   }else{
   i--;
   }
}

    
//出力
for (i = 0; i < d; i++) {
    if(l[i][2]*l[i][2] == (l[i][1]*l[i][1]+l[i][0]*l[i][0])){
    cout << "YES\n";
    }else{
    cout << "NO\n";
    }
}

    return 0;
}

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

using namespace std;

int pow2Int(int n){
    return n * n;
}

int main(void)
{
    int N;
    cin >> N;
    for(int n = 0; n < N; ++n){
        vector<int> nums(3);
        for(int i = 0; i < 3; ++i){
            cin >> nums[i];
        }
        sort(nums.begin(), nums.end());
        cout << ((pow2Int(nums[0]) + pow2Int(nums[1]) == pow2Int(nums[2])) ? "YES" : "NO") << endl;
    }
    
    return 0;
}

C++: #include<iostream>

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

	

    return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
   int n,a,b,c,t;

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

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

   }

   return 0;
}

C++: #include <iostream>

void printN (int N);
int main()
{
    int N;
    std::cin >> N;
    printN (N);
	return 0;
    }

void printN (int N)
{
    for (int i = 0; i < N; ++i) {
        int x, y, z;
        std::cin >> x >> y >> z;
        if (x * x + y * y == z * z) {
        std::cout << "yes" << std::endl;
        } else if (y * y + z * z == x * x) {
        std::cout << "yes" << std::endl;
        } else if (z * z + x * x == y * y) {
        std::cout << "yes" << std::endl;
        } else {
        std::cout << "no" << std::endl;
        }
    }
}

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

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

C++: YES = "YES"
NO = "NO"

def sq(x)
	return x * x
end

gets.to_i.times do
	puts ->(l){
		if sq(l[0]) + sq(l[1]) == sq(l[2])
			return YES
		elsif sq(l[1]) + sq(l[2]) == sq(l[0])
			return YES
		elsif sq(l[2]) + sq(l[0]) == sq(l[1])
			return YES
		end
		return NO
	}.call gets.split(' ').map(&:to_i)
end

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

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

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

int main(){
	int n;
	int in[3];
	bool ans[1000];
	std::cin >> n;
	for (int i = 0; i < n; ++i){
		std::cin >> in[0] >> in[1] >> in[2];
		std::sort(std::begin(in), std::end(in));
		ans[i] = (in[2] * in[2] == in[0] * in[0] + in[1] * in[1]);
	}
	for (int i = 0; i < n; ++i){
		if (ans[i])std::cout << "YES" << std::endl;
		else std::cout << "NO" << std::endl;
	}
	return 0;
}

C++: #include<iostream>
#include<cstdio>
#include<stdio.h>
#include<string>
using namespace std;
int main() {
	long judge[1000],i,n,a[1000],b[1000],c[1000];

	cin >> n;
	for (i = 0; i < n; i++) {
		cin >> a[i] >> b[i] >> c[i];
		if (a[i]*a[i] + b[i]*b[i] == c[i]*c[i]) {
			judge[i] = true;
		}
		else {
			judge[i] = false;
		}

	}
	for (i = 0; i < n; i++) {
		if (judge[i]==true) {
			cout << "Yes" << endl;
		}
		else {
			cout << "No" << endl;
		}
	}
	
	

	return 0;
}

C++: //
//  main.cpp
//  b
//
//  Created by h3037178 on 2017/07/31.
//  Copyright ?? 2017??´ ?????£?????????. All rights reserved.
//

#include <iostream>
#include<algorithm>
#include<math.h>
using namespace std;
int main(){
    int n,a,i[3],f[3];
    cin>>n;
    for(int l=0;l<n;l++){
        for(a=0;a<3;a++){
        cin>>i[a];
            f[a]=i[a]^2;
        }
        sort(f,f+3);
        if(f[2]==f[0]+f[1]){
            cout<<"Yes"<<endl;
        }else{
            cout<<"No"<<endl;
        }
    }
}

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

int main(){

	int n;
	int sd[3];
	int max,m=-1;
	bool isRect=false;
	bool isTri=true;

	cin>>n;

	for(int i=0;i<n;++i){
		cin>>sd[0]>>sd[1]>>sd[2];
		//長辺の判定
		max=0;
		for(int i=0;i<3;++i){
			if(sd[i]==0){isTri=false;}
			if(sd[i]>max){m=i;}
		}

		//直角三角形の判定
		if(isTri){
			switch(m){
			case 0:
				if(sd[0]*sd[0] == (sd[1]*sd[1] + sd[2]*sd[2])){isRect=true;}else{isRect=false;}
				break;
			case 1:
				if(sd[1]*sd[1] == (sd[0]*sd[0] + sd[2]*sd[2])){isRect=true;}else{isRect=false;}
				break;
			case 2:
				if(sd[2]*sd[2] == (sd[1]*sd[1] + sd[0]*sd[0])){isRect=true;}else{isRect=false;}
				break;
			}
		}

		if(isRect){cout<<"YES\n";}else{cout<<"NO\n";}

	}
}