Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	n, _ := strconv.Atoi(scanner.Text())
	num := int(n)
	var strs []string
	var a, b, c int
	var res string
	var YES string = "YES"
	var NO string = "NO"
	for i := 0; i < num; i++ {
		scanner.Scan()
		strs = strings.Split(scanner.Text(), " ")
		a, _ = strconv.Atoi(strs[0])
		b, _ = strconv.Atoi(strs[1])
		c, _ = strconv.Atoi(strs[2])

		res = NO
		if c*c == (a*a+b*b) || b*b == (a*a+c*c) || a*a == (b*b+c*c) {
			res = YES
		}
		fmt.Printf("%s\n", res)
	}
}

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <set>
#include <vector>
#include <cstring>
#include <climits>
#include <queue>
using namespace std;

#define REP(i,a,n) for(int i=(a); i<(int)(n); i++)
#define rep(i,n) REP(i,0,n)

int main(){
	int n,a,b,c;
	scanf("%d",&n);
	rep(i,n){
		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 ){
			puts("YES");
		}else{
			puts("NO");
		}
	}
	return 0;
}

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

int main(void){
	int x[3];
	cin >> x[1];
	string n = "NO", y = "YES";
	while(cin >> x[0] >> x[1] >> x[2]){
		sort(x,x + 3);
		if(x[2] * x[2] == x[1] * x[1] + x[0] * x[0])
			cout << y << endl;
		else
			cout << n << endl;
		i++;
	}
	return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int a,b,c1,c2,c3,i;
	scanf("%d",&a);
	for(i=0;i<a;i++){
		scanf("%d %d %d",&c1,&c2,&c3);
	}
	if(c1*c1+c2*c2==c3*c3){
		printf("YES\n");
	}
	else if(c1*c1+c3*c3==c2*c2){
		printf("YES\n");
	}
	else if(c2*c2+c3*c3==c1*c1){
		printf("YES\n");
	}
	else{
		printf("NO\n");
	}
	return 0;
}

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