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

C++: #include <bits/stdc++.h>
#include<cmath>
using namespace std;
int main(int argc, char const *argv[])
{
    int n;
    cin>>n;
    while (n--)
        {
            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 <stdio.h>

void main(){
	int a, b, c, N, i;

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

int chk(int a, int b, int c){
	int x;

	if(a >= b){
		x = a;
		a = b;
		b = x;
	}

	if(b >= c){
		x = b;
		b = c;
		c = x;
	}

	if(a >= b){
		x = a;
		a = b;
		b = x;
	}

	if(c*c == a*a + b*b) return 1;
	else return 0;
}

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

int main() {
  int Tc;
  cin>> Tc;
  for(int tc = 0; tc < Tc; ++tc) {
    vector<int> v(3);
    for(int i = 0; i < 3; ++i) cin >> v[i];
    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;
}

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]){
			printf("YES\n");
		}else{
			printf("NO\n");
		}
		n--;
	}
}

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

int main() {
	int a;
	scanf("%d", &a);
	vector<int>b(3);
	for (int c = 0; c < a; c++) {
		scanf("%d%d%d", &b[0], &b[1], &b[2]);
		sort(b.begin(), b.end());
		if (b[0] * b[0] + b[1] * b[1] == b[2] * b[2])printf("YES\n");
		else printf("No\n");
	}
}

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

int check(int a,int b,int c)
{
	a=a*a;
	b=b*b;
	c=c*c;
	if(a>=b&&a>=c&&a==b+c)
		return 1;
	if(b>=a&&b>=c&&b==c+a)
		return 1;
	if(c>=a&&c>=b&&c==b+a)
		return 1;
	return 0;
}
int main()
{
	int N,a,b,c;
	cin>>N;
	while(N--){
		cin>>a;
		cin>>b;
		cin>>c;
		if(check(a,b,c))
			cout<<"YES"<<endl;
		else
			cout<<"NO"<<endl;
	}
}

C++: #include<iostream>

using namespace std;

int main()
{
    int n;
    cin >> n;

    int x[n];
    int y[n];
    int z[n];

    for(int i = 0; i < n; i++)
    {
        cin >> x[i] >> y[i] >> z[i];
    }

    for(int j = 0; j < n; j++)
    {
        if(x[j] * x[j] == y[j] * y[j] + z[j] * z[j]
        || y[j] * y[j] == z[j] * z[j] + x[j] * x[j] 
        || z[j] * z[j] == x[j] * x[j] + y[j] * y[j])
        {
            cout << "YES" << endl;
        }
        else
        {
            cout << "NO" << endl;
        }
    }
}

C++: //-------------
//include
//-------------
#include <map>
#include <list>
#include <cmath>
#include <vector>
#include <string>
#include <cctype>
#include <cstdlib>
#include <iostream>
#include <algorithm>
using namespace std;
//-------------
//typedef
//-------------
typedef  long long LL;
typedef  vector<int> VI;
typedef  vector<double> VD;
typedef  string STR;
typedef  pair<int, int> PII;
typedef  vector<int, int> VII;
typedef  map<string, int> MSI;
//-------------
//utillty
//-------------
#define ALL(a)  (a).begin(),(a).end()
#define MK make_pair
#define PB push_back
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define COUT(a) cout<<a<<endl
#define POW2(a) pow(a, 2.0)
//-------------
//repetition
//-------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
//-------------
//debug
//-------------
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define dumpl(c) REP(i,SZ(c))cerr<<#c<<i<<"="<<(c[i])<<endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

const int MOD = 1000000007;
int main()
{
	int x;
	cin >> x;
	VD tri;
	REP(i,x)
	{
		double temp;
		tri.push_back(temp);
	}
	SORT(tri);
	if (POW2(tri[2]) == sqrt(POW2(tri[0])+POW2(tri[1])))
	{
		COUT("YES");
	}
	else
	{
		COUT("NO");
	}
#ifdef _DEBUG
	while(1);
#endif // _DEBUG

	return 0;
}

C++: #include<iostream>
using namespace std;
int main()
{
	int times;
	cin >> times;
	bool * a = new bool[times];
	for (int i = 0; i<times; ++i)
	{
		int q, w, e;
		cin >> q >> w >> e;
		if (q + w>e&&q + e>w&&e + w>q)
		{
			if (q*q + w * w == e * e || w * w + e * e == q * q || q * q + e * e == w * w)
				a[i] = true;
			else a[i] = false;
		}
		else
		{
			a[i] = false;
		}
	}
	for (int i = 0; i<times; ++i)
	{
		if (a[i])    cout << "YES" << endl;
		else    cout << "NO" << endl;
	}

}

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

class Triangle{
public:
Triangle(){
}
void push(int num1,int num2,int num3){
if(num1>=num2){
if(num1>=num3){c=num1;a=num2;b=num3;}
else{c=num3;a=num1;b=num2;}
}
else{
if(num2>=num3){c=num2;a=num1;b=num3;}
else{c=num3;a=num1;b=num2;}
}
};
void checkRight(){
int cs=c*c;
if(cs==a*a+b*b) ans=1;
else ans=0;
};

void print(){
if(ans==0)
cout << "NO" << endl;
if(ans==1)
cout << "YES" << endl;
}

protected:
int a,b,c,ans=5;
};

int main(){
int num,a,b,c;
	Triangle *tri /* = Triangle[1000]*/;
	cin >> num;
	tri = new Triangle[num]/*(a,b,c)*/;
	for(int n=0;n<num;n++){
	cin >> a;
	cin >> b;
	cin >> c;
	tri[n].push(a,b,c);
	}
for(int n=0;n<num;n++){
tri[n].checkRight();
tri[n].print();
}
return 0;
}

C++: #include<stdio.h>

void handan(int a, int b, int c)
{
	if (a*a == b*b + c*c)
		printf("YES\n");
	else
		printf("NO\n");
}
int main()
{
	int n;
	int a, b, c;

	scanf("%d", &n);
	for (int i = 0; i < n; i++)
	{
		scanf("%d %d %d", &a, &b, &c);
		if (a > b&&a > c)
			handan(a, b, c);
		else if (b > a&&b > c)
			handan(b, c, a);
		else
			handan(c, a, b);
	}
	return 0;
}

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

void judgement(unsigned int a, unsigned int b, unsigned int c) {
	if ((a ^ 2) == (b ^ 2) + (c ^ 2) || (b ^ 2) == (a ^ 2) + (c ^ 2) || (c ^ 2) == (a ^ 2) + (b ^ 2)) {
		cout << "YES" << endl;
	}
	else {
		cout << "NO" << endl;
	}
}

int main() {
	int n;//dataset

	cin >> n;

	vector<unsigned int> vector_a;
	vector<unsigned int> vector_b;
	vector<unsigned int> vector_c;

	for (int i = 0; i < n; i++)
	{
		int a, b, c;
		cin >> a >> b >> c;
		vector_a.push_back(a);
		vector_b.push_back(b);
		vector_c.push_back(c);
	}

	for (int i = 0; i < n; i++) {
		judgement(vector_a[i], vector_b[i], vector_c[i]);
	}

	return 0;

}

C++: #include<stdio.h>

int main(void)
{
	int x,n;
	int a[1000]={0},b[1000]={0},c[1000]={0},jud[1000]={0};

	scanf("%d",&x);
	
	for(n=0;n<x;n++)
	{
		scanf("%d %d %d",&a[n],&b[n],&c[n]);

		a[n]=a[n]*a[n];
		b[n]=b[n]*b[n];
		c[n]=c[n]*c[n];

		if(a[n]==(b[n]+c[n])||b[n]==(a[n]+c[n])||c[n]==(a[n]+b[n]))
		{
			jud[n]=1;
		}
		else
		{
			jud[n]=0;
		}
	}

	for(n=0;n<x;n++)
	{
		if(jud[n]==1)
		{
			printf("YES\n");
		}
		else if(jud[n]==0)
		{
			printf("NO\n");
		}
	}

	return 0;
}