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>
#include <stdio.h>
#include <vector>
#include <algorithm>
#include <math.h>

int main() {
    int n;
    std::vector<int> V;
    
    scanf("%d", &n);
    for (int i = 0; i < n; i++) {
        int a, b, c; std::cin >> a >> b >> c;
        V.push_back(pow(a,2)); V.push_back(pow(b, 2)); V.push_back(pow(c, 2));
        std::sort(V.begin(), V.end());
        if (V[2] == V[1] + V[0]) printf("YES\n");
        else printf("NO\n");
    }
    
    return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main( void )
{
	int n;
	cin >> n;

	for ( int c = 0; c < n; c++ )
	{
		vector <int> vertexs;
		for ( int i = 0; i < 3; i++ )
		{
			int vertex;
			cin >> vertex;
			vertexs.push_back( vertex );
		}

		sort( vertexs.begin(), vertexs.end() );

		bool ok = false;
		do
		{
			if ( vertexs[0] * vertexs[0] == vertexs[1] * vertexs[1] + vertexs[2] * vertexs[2] )
			{
				ok = true;
			}
		} while ( next_permutation( vertexs.begin(), vertexs.end() ) );

		if ( ok )
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}

	return 0;
}

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

#define DEBUG

#ifndef DEBUG 
#define fprintf (void)
#endif 

int main(void){
	
	int rec,i,j,t,count;
	int n[3]={0,0,0};
	
	scanf("%d",&t);
	
	for(i=0;i<t;i++){
		for(j=0;j<3;j++){
			scanf("%d",&rec);
			if(rec==0){
				count=1;
			}
			if(rec>n[0]){
				n[2]=n[1];
				n[1]=n[0];	
				n[0]=rec;
			}else if(rec>n[1]){
				n[2]=n[1];
				n[1]=rec;
			}else if(rec>n[2]){
				n[2]=rec;
			}
		}
		if(count=1){
			printf("NO\n");
		}else if(n[0]*n[0]==n[1]*n[1]+n[2]*n[2]){
			printf("YES\n");
		}else{
			printf("NO\n");
		}
	}
	
	return 0;
}

C++: #include <bits/stdc++.h>
#include <iostream>
#include <string>
#include <stdio.h>
#include <math.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using ll = long long;
typedef long double lb;
using namespace std;
int main(){
  int N;
  cin >> N;
  for(int i = 1; i <= N; i++){
    ll P,Q,R;
    cin >> P >> Q >> R;
    int O = max(P,max(Q,R));
    if(O * O == P * P + Q * Q + R * R - O * O){
      cout << "YES" << endl;
    }
    else{
      cout << "NO" << endl;
    }
  }
}

C++: #include<stdio.h>
int main(void){
	int i,N;
	scanf("%d",&N);
	for(i=0;i<N;i++){
		int j,a[3]={},b[3]={};
		for(j=0;j<3;j++){
			scanf("%d",&a[j]);
			}
		
		b[0]=a[0];
		if(a[0]<a[1]){
			b[1]=a[0];
			b[0]=a[1];
		}b[1]=a[1];
		if(b[0]<a[2]){
			b[2]=b[1];
			b[1]=b[0];
			b[0]=a[2];
		}else if(b[1]<a[2]&&a[2]<b[0]){
			b[2]=b[1];
			b[1]=a[2];
		}else b[2]=a[2];
		
	
		if(b[0]*b[0]==b[1]*b[1]+b[2]*b[2])
			puts("YES");
		else puts("NO");
	}
	return 0;
}

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

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

using namespace std;

void solve(int a, int b, int c) {
	bool f = false;
	int max_num = max (a, max(b, c));
	int sub1, sub2;
	if (max_num != a) {
		sub1 = a;
		if (max_num != b) sub2 = b;
		else sub2 = c;
	}
	else if (max_num != b) {
		sub1 = b;
		sub2 = c;
	}
	if (pow(max_num, 2) == pow(sub1, 2) + pow(sub2, 2)) f = true;
	if (f) cout << "YES" << endl;
	else cout << "NO" << endl;
}

int main() {
	int num, a, b, c;
	cin >> num;
	for (int i = 0; i<num; i++) {
		cin >> a >> b >> c;
		solve(a, b, c);
	}
	return 0;
}

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

int main(){
	int n;
	cin >> n;
	for(int i = 0;i < n;++i){
		int a[3];
		for(int j = 0;j < 3;++j){
			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;
		}
	}
	return 0;
}

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

int n,a[3];

int main(){
    scanf("%d",&n);
    while(n--){
        for(int i=0;i<3;i++)scanf("%d",&a[i]);
        sort(a,a+3);
        if(a[2]*a[2]==a[0]*a[0]+a[1]*a[1])puts("YES");
        else puts("NO");
    }
    return 0;
}

C++: #include <iostream>

using namespace std;

int main(){

  int N, a, b, c;

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

  return 0;
}

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

int main()
{
	int N;
	cin >> N;
	int A[3];
	for (int i = 0; i < N; i++) {
		for (int j = 0; j < N; j++) {
			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;
	}
    return 0;
}