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 <algorithm>
using namespace std;
int main(){
    int a[3], n;
    cin >> n;
    while(n > 0){
        cin >> a[0] >> a[1] >> a[2];
        sort(a, a + 3);
        if(a[0] * a[0] + a[1] * a[1] == a[2] * a[2])
            cout << "YES" << endl;
		else
            cout << "NO" << endl;
        n--;
    }
     return 0;
}

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

using namespace std;

int aa(int x, int y, int z) {

	return ((pow(x, 2) + pow(y, 2) == pow(z, 2)) || (pow(x, 2) + pow(z, 2) == pow(y, 2)) || (pow(y, 2) + pow(z, 2) == pow(x, 2)));
}

int main() {

	int a, b[1000], c[1000], d[1000];
	bool e[1000];

	cin >> a;

	for (int i = 1; i <= a; i++)
	{
		cin >> b[i] >> c[i] >> d[i];

		e[i] = aa(b[i], c[i], d[i]);

	}

	for (int i = 1; i <= a; i++)
	{

		cout << ((e[i] != 0) ? "YES" : "NO") << endl;
	}

	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll mod = 1e9 + 7;
const ll inf = (1 << 30) - 1;
const ll infll = (1LL << 61) - 1;

int N;

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

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

using namespace std;

int main(){
	int n,a,b,c;
	int m=0;
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		int a[3];
		for(int j=0;j<3;j++)scanf("%d",&a[j]);
		std::sort(a,a+3);
		
		m=max(m,a[2]);
		
		int s = 10;
		if(a[0]*a[0]+a[1]*a[1] == a[2]*a[2]){
			if(m<=s)puts("YES");
			else puts("NO");
		}else{
			if(m<=s)puts("NO");
			else puts("YES");
		}
	}
}

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

using namespace std;

int main(){
	int n,a,b,c;
	int m=0;
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		int a[3];
		for(int j=0;j<3;j++)scanf("%d",&a[j]);
		std::sort(a,a+3);
		
		int d = 10;
		if(a[0]>d || a[1]>d || a[2]>d)puts("hogehogehoge");
		
		if(a[0]*a[0]+a[1]*a[1] == a[2]*a[2]){
			puts("YES");
		}else{
			puts("NO");
		}
	}
}

C++: #include<iostream>

int main(){
	int a,b,c,i,n;
	std::cin>>n;
	for(i=0;i<n;i++){
	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>
#include <cmath>
using namespace std;

int main(){
    int n;
    cin >> n;
    int a,b,c;
    while(cin >> a >> b >> c){
        //cout << a << b << c << endl;
        if(pow(a,2.0)+pow(b,2.0)==pow(c,2.0) || pow(a,2.0)+pow(b,2.0)==pow(c,2.0) || pow(a,2.0)+pow(b,2.0)==pow(c,2.0)){
            cout << "YES" << endl;
        }else{
            cout << "NO" << endl;
        }
    }
}

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

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

int main() {
int a,b,c,i,x=a*a,y=b*b,z=c*c;
cin>>i;
for(int n=1; n<=i; n++){
cin>>a>>b>>c;


if(x+y==z||x+z==y||y+z==x) {cout<<"YES";}
else{cout<<"NO";}	
}

// your code goes here
	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*a + b*b == c*c ||
       b*b + c*c == a*a ||
       c*c + a*a == b*b){
      cout << "YES" << endl;
    }
    else cout << "NO" << endl;
  }
}

C++: #include <iostream>
int main(void){
	int n;
	std::cin>>n;
	while(n--){
		int a,i=3,b=0,c=0;
		for(;i--;){
			std::cin>>a;
			a*=a;
			b=a>b?a:b;
			c+=a;
		}
		std::cout<<(c==2*b?"YES\n":"NO\n");
	}
}

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

int main(){

	int n;
	for(cin >> n;n > 0;--n){
		int a, b, c, t;
		cin >> a >> b >> c;
		if(a>b && a>c){t=a;a=c;c=t;}
		if(a<b && b>c){t=b;b=c;c=t;}
		if(a*a + b*b == c*c)cout << "YES\n";
		else cout << "NO\n";
	}
	return 0;
}

C++: #include<stdio.h>

void swap(int *x,int *y)
{
	int temp = *x;
	*x=*y;
	*y=temp;
}

int main()
{
	int count;
	scanf("%d",&count);

	for(int i=0;i<count;i++)
	{
		int a,b,c;
		scanf("%d %d %d",&a,&b,&c);
		if(a<b)
			swap(&a,&b);
		if(a<c)
			swap(&a,&c);

		if(a*a == b*b+c*c)
			printf("YES\n");
		else
			printf("NO\n");
	}

}

C++: #include <stdio.h>
#include <math.h>
#include <queue>
#include <vector>
using namespace std;
 
int main()
{
    double a,b,c;
    int n,i;
    priority_queue< double, vector<double>, greater<double> > que;
 
    scanf("%d",&n);
 
    for(i = 0; i < n; i++){
        scanf("%lf %lf %lf",&a,&b,&c);
        que.push(a);
        que.push(b);
        que.push(c);
        a = que.top();
        que.pop();
        b = que.top();
        que.pop();
        if(pow( que.top(),2.0 ) == pow( a,2.0 ) + pow( b,2.0 )){
            printf("YES\n");
        }
        else{
            //printf("%lf %lf\n",pow( que.top(),2.0 ),pow( a,2.0 ) + pow( b,2.0 ));
            printf("NO\n");
        }
        que.pop();
    }
 
    return 0;
}

C++: #include <cstdio>

int main(){
	int n,s[5],tmp;
	int a[1010];int b[1010];int c[1010];

	scanf("%d",&n);

	for(int i =1;i<=n;i++){
		scanf("%d %d %d",&s[1],&s[2],&s[3]);
		int x = 1;
		while(x > 0){
			x=0;
			for(int k = 1;k<3;k++){
				if(s[k] > s[k+1]){
					tmp=s[k];s[k]=s[k+1];s[k+1]=tmp;x++;
				}
			}
		}
		c[i] = s[3];b[i]=s[2];a[i]=s[1];
	}

	for(int j =1;j<=n;j++){
		if((c[j]*c[j]) == ((a[j]*a[j])+(b[j]*b[j]))){
			printf("YES\n");
		}else{
			printf("NO\n");
		}
	}
}

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

using namespace std;

int main(){
	int n;
	int a[3];
	cin >> n;
	for(int i=0; i<n; i++){
		cin >> a[0] >> a[1] >> a[2];
	sort(a,a+3);
	if((a[2] * a[2]) == (a[1] * a[1] ) + (a[0] * a[0]))
		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[3];
    cin >> a[0] >> a[1] >> a[2];

    int max = 0;
    for (int i = 0; i < 3; i++) {
      max = a[i] > max ? a[i] : max;
    }

    for (int i = 0; i < 3; i++) {
      a[i] = a[i] == max ? 0 : a[i];
    }

    max *max == a[0] * a[0] + a[1] * a[1] + a[2] * a[2] ? cout << "Yes" << endl
                                                        : cout << "No" << endl;
  }

  return 0;
}

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

int main (void)
{
	int a,b,c;
	int n;
	
	while (cin >> n){
		for (int i=0; i<n; i++) {
			cin >> a >> b >> c;
			if (a*a + b*b == c*c)	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;
		cin>>a>>b>>c;
		if(a*a+b*b==c*c){
			cout<<"YES"<<endl;
		}else if(a*a+b*b!=c*c){
			cout<<"NO"<<endl;
		}
	}	
}

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

using namespace std;

int main()
{
  int n;
  cin >> n;
  for ( int i = 0; i < n; i++ ) {
    vector<int> v;
    int t;
    for ( int j = 0; j < 3; j++ ) {
      cin >> t;
      v.push_back( t );
    }
    sort( v.begin(), v.end() );
    if ( v[0] * v[0] + v[1] * v[1] == v[2] * v[2] )
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}