Go: package main

import "fmt"

func main() {
	var n int

	fmt.Scanf("%d", &n)

	var a, b, c int
	for i := 0; i < n; i++ {
		var isTriangle bool
		fmt.Scanf("%d %d %d", &a, &b, &c)

		if a*a == b*b+c*c || b*b == a*a+c*c || c*c == b*b+a*a {
			isTriangle = true
		}

		if isTriangle == true {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

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

int main(){

	int input[1000][3], num, i, j, temp;
	
	cin >> num;
	
	for(i = 0; i < num; i++){
	
		cin >> input[i][0] >> input[i][1] >> input[i][2];
		
		if(input[i][0] < input[i][1]){
			temp = input[i][0];
			input[i][0] = input[i][1];
			input[i][1] = temp;
			}

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

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

int main() {
  int n;
  cin >> n;
  for(int i=0; i<n; i++) {
    int x, y, z;
    cin >> x >> y >> z;
    if (x*x+y*y == z*z || x*x+z*z==y*y || y*y+z*z==x*x)
      cout << "YES"<<endl;
    else
      cout << "NO" << endl;
  }
}

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

int main()
{
    int a,b,c,n,i;
    scanf("%d",&n);
    i=0;
    while(i<n)
    {
        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");
        else if(b*b+c*c==a*a)
            printf("YES");
        else
            printf("NO\n");
            i++;
    }
    return 0;
}

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

int main(){
	int n, a, b, c, x, y, z;
	
	cin >> n;
	for(int i = 0; i < n; i++){
		cin >> a >> b >> c;
		int sum = a + b + c;
		x = max(a,max(b,c));
		y = min(a,min(b,c));
		z = sum - x - y;
		
		if((y*y) + (z*z) == (x*x))
			cout << "Yes" << endl;
		else
			cout << "No" << 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 <cstdio>
#include <cstring>
#include <algorithm>

using namespace std;

int main()
{
	int n;
	scanf("%d", &n);
	for (int i = 0; i < n; ++i)
	{
		int e[3];
		for (int j = 0; j < 3; ++j)
			scanf("%d", e+j);
		sort(e, e+3);

		if (e[0]*e[0]+e[1]*e[1] == e[2]*e[2])
			puts("YES");
		else
			puts("NO");
	}

	return 0;
}

C++: #include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;

int main()
{
    int n;
    cin >> n;
    for(int i=0; i<n; ++i){
        vector<int> a(3);
        for(int j=0; j<3; ++j)
            cin >> a[j];
        sort(a.begin(), a.end());
        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(void){
    int n1, n2, n3, m;
    scanf("%d",&m);
    for(i = 0;i < m;i++) {
        scanf("%d %d %d",&n1,&n2,&n3);
        if(n1 * n1 + n2 * n2 = n3 * n3)
            printf("YES");
        else
            printf("NO");
        }
    return 0;
}

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;
}