Go: package main

import (
	"fmt"
)

func main() {
	lines := [3]int{}
	var round int
	fmt.Scan(&round)
	for r := 0; r < round; r++ {
		fmt.Scan(&lines[0], &lines[1], &lines[2])

		if lines[0] > lines[1] && lines[0] > lines[2] {

		} else if lines[2] > lines[1] {
			tmp := lines[0]
			lines[0] = lines[2]
			lines[2] = tmp
		} else {
			tmp := lines[0]
			lines[0] = lines[1]
			lines[1] = tmp
		}

		if lines[1]*lines[1]+lines[2]*lines[2] == lines[0]*lines[0] {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

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

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

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

#define PI ( atan2(1,1) * 4)

double trigon_angle(double a, double b, double c){
	double ans;
	ans = (b*b + c*c - a*a) / (2*b*c);
	ans = atan2(sqrt(1-ans * ans),ans);
	return ans* 180 / PI;
}
int main(void) {
	int i,c,n,hen[3];
	double h,a;
	scanf("%d",&n);
	
	for(i = 0; n > i; i++){
		scanf("%d%d%d",&hen[0], &hen[1], &hen[2]);
		for(c = 0; 3 > c; c++){
			a = trigon_angle(hen[c], hen[(c+1)%3], hen[(c+2)%3]);
			if((int)a == 90) {printf("YES\n");break;}
		}
		if(3 == c)printf("NO\n");
	}
	return 0;
}

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

int main()
{
	int n, a[1000][3];
	cin >> n;
	for (int i = 0;i < n;i++) {
		cin >> a[i][0] >> a[i][1] >> a[i][2];
		int x = a[i][0] * a[i][0], y = a[i][1] * a[i][1], z = a[i][2] * a[i][2];
		if (x == y + z || y == z + x || z == x + y) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}
    return 0;
}

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

C++: #include <iostream>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <algorithm>
#include <string>
int main()
{
    int a,b,c,n,i;
    scanf("%d",&n);
    for (i=1;i<=n;i++)
    {
        scanf("%d %d %d",&a,&b,&c);
        if ((a*a+b*b==c*c)||(a*a+c*c==b*b)||(b*b+c*c==a*a))
            printf("%s","YES\n");
        else
            printf("%s","NO\n");
    }
    return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int main(void){
    int n;
    vector<int> a(3);
    cin>>n;
    for(int i=0;i<n;i++){
        cin>>a[0]>>a[1]>>a[2];
        sort(a.begin(),a.end());
        if(a[2]*a[2]==a[0]*a[0]+a[1]*a[1])cout<<"YES"<<endl;
        else cout<<"NO"<<endl;
    }
    return 0;
}

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

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

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

  return 0;
}

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

int main(int argc, char *argv[]) {
  int n;
  string yes = "YES";
  string no = "NO";

  cin >> n;
  vector<string> result;
  int tri[3];
  for (int i = 0; i < n; i++) {
    cin >> tri[0] >> tri[1] >> tri[2];
    sort(tri, tri+3);
    int hoge = pow(tri[0], 2) + pow(tri[1], 2);
    result.push_back(pow(tri[2], 2) == hoge ? yes : no);
  }
  for (int i = 0; i < n; i++)
    cout << result[i] << endl;
  return 0;
}

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

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

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

int main() {
	// your code goes here
	int n;
	cin >> n;
	for (int i=0;i<n;i++) {
		int a,b,c;
		cin >> a >> b >>c;
		int aa = a*a;
		int bb = b*b;
		int cc = c*c;
		if (aa==bb+cc||bb==aa+cc||cc==aa+bb) {
			cout <<"YES"<<endl;
		}
		else {
			cout <<"NO"<<endl;
		}
	}
	return 0;
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
int main(){
	int N;
	cin>>N;
	for (int i = 0; i < N; i++) {
		int len[3];
		for (int j = 0; j < 3; j++) {
			cin>>len[j];
		}
		sort(len,len+3);
		if(pow(len[2],2)==pow(len[1],2)+pow(len[0],2)){
			puts("YES");
		}else{
			puts("NO");
		}
	}
	return 0;
}

C++: #include <cstdio>

int i,a,b,c;
int main()
{
	scanf("%d",&i);
		while(i!=0)
		{
			scanf("%d %d %d",&a,&b,&c);
			
			if(a+b>c&&b+c>a&&c+a>b)
			{
				printf("YES\n");
			}
			else if(c>=a+b||b+c>=a||c+a>=b)	
			{
				printf("NO\n");
			}
			i--;
		}

	return 0;
}

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

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

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

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

C++: #include <bits/stdc++.h>
using namespace std;

int main() {
    int N, a, b;
    cin >> N;
    vector<int>triangle(3);
    for(int i = 0; i < N; i++){
      for(int j = 0; j < 3; j++){
        cin >> triangle.at(j);
      }
      sort(triangle.begin(), triangle.end());

      int A, B, C;

      A = triangle.at(0);
      B = triangle.at(1);
      C = triangle.at(2);

      if(A * A + B * B == C * C){
        cout << "YES" << endl;
      }
      else{
        cout << "NO" << endl;
      }
    }
}

C++: #include<iostream>
using namespace std;
int main() {
	int data_lim;
	cin >> data_lim;
	for(int cnt=0;cnt<data_lim;cnt++) {
		int a,b,c;
		cin >> a >> b >> c;
		
		bool flg = false;
		// ピタゴラスの定理を適用
		if(a*a == b*b+c*c)
			flg = true;
		else if(b*b == a*a+c*c)
			flg = true;
		else if(c*c == a*a+b*b)
			flg = true;
		
		if(flg == true)
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
		
	}
	
	return 0;
}

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

int main(){
  int a, b, c, n;
  cin >> n;
  while((n--) && (cin >> a)){
    cin >> b;
    cin >> c;
    a = a * a;
    b = b * b;
    c = c * c;
    if((a + b == c) || (a + c == b) || (b + c == a)) cout << "YES\n";
    else cout << "NO\n";
  }

  return 0;
}

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

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