Go: package main

import "fmt"

func main() {
	var n int

	fmt.Scanf("%d", &n)

	var a, b, c int
	for i := 0; i < n; i++ {
		var isTriangle bool
		fmt.Scanf("%d %d %d", &a, &b, &c)

		if a*a == b*b+c*c || b*b == a*a+c*c || c*c == b*b+a*a {
			isTriangle = true
		}

		if isTriangle == true {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

C++: #include <string>
#include <iostream>
#include <vector>
#include <sstream>
using namespace std;
void swap(int idx1, int idx2, int *node)
{
	int f = node[idx1];
	node[idx1] = node[idx2];
	node[idx2] = f;
}
//nlogn
void quickSort(int left, int right, int *node)
{
	int pl = left;
	int pr = right;
	int pivot_f = node[(pl + pr) / 2];
	do
	{
		while (node[pl] < pivot_f)
		{
			pl++;
		}
		while (node[pr]> pivot_f)
		{
			pr--;
		}
		if (pl <= pr)
		{
			swap(pl++, pr--, node);
		}
	} while (pl <= pr);
	if (left < pr) quickSort(left, pr, node);
	if (pl <= right) quickSort(pl, right, node);
}

bool compare(int a, int b)
{
	if (a == b)
	{
		return true;
	}
	else {
		return false;
	}
}
int main()
{
	string max;
	getline(cin, max);
	string ans[1000];
	int count = 0;
	for (int num = 0; num < stoi(max); num++)
	{
		string str;
		string item;
		vector<string> list;
		getline(cin, str);
		int edge[3];
		stringstream ss(str);
		while (getline(ss, item, ' ') && !item.empty()) {
			list.push_back(item);
		}
		
		edge[0] = stoi(list[0].c_str());
		edge[1] = stoi(list[1].c_str());
		edge[2] = stoi(list[2].c_str());
		quickSort(0, 2, edge);

		int edge1 = edge[2] * edge[2];
		int edge2 = edge[0] * edge[0] + edge[1] * edge[1];
		if (compare(edge1, edge2))
		{
			ans[count] = "YES";
			count++;
		}
		else {
			ans[count] = "NO";
			count++;
		}
	}
	for (int i = 0; i < count;i++)
	{
		cout << ans[i] << endl;
	}
	return 0;
}

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

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


    }
    return 0;
}

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

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

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

C++: #include<iostream>
#include<vector>
using namespace std;
int main(){
  int a,b,c;
  //vector<int> v;
  //while (cin >> a >> b >> c){
  //v.push_back(a,b,c);
  //  }
  //int x = a + b;
  //int y = b + c;
  //int z = c + a;
  //if (x => c || y => a || z => b){
  //cout << "NO" << endl;
  //} else if(x < c || y < a || z < b){
  //cout << "YES" << endl;
  //}
  while(1){
    cin >> a;
    cin >> b;
    cin >> c;
    int x = a + b;
    int y = b + c;
    int z = c + a;
    if (a==0,b==0,c==0)break;
    if (x <= c || y <= a || z <= b){
      cout << "NO" << endl;
    }else if(x > c || y > a || z > b){
      cout << "YES" << endl;
    }
  }
  return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
    int a,b,c,count=0;
    while(cin>>a>>b>>c){
        count++;
    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;
        if(count==1000)break;
    }
}

C++: #include<iostream>
using namespace std;
int main()
{
    int a,b,c,n,i,min1,min2,max;
    cin>>n;
    for( i=1;i<=n;i++)
    {
        cin>>a>>b>>c;
        if(a>b&&a>c)
        {
            max=a;
            min1=b;
            min2=c;

        }
        else if(b>a&&b>c)
        {
            max=b;
            min1=a;
            min2=c;
        }
        else
        {
            max=c;
            min1=a;
            min2=b;
        }

        if(min1*min1+min2*min2==max*max)
            cout<<"YES"<<"\n";
        else
            cout<<"NO"<<"\n";
    }
    return 0;

}

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

int main()
{ 
	int n;
	cin >> n;
	for (int i = 0; i < n; i++) {
		int a[3];
		int max = 0;
		for (int j = 0; j < 3; j++) {
			cin >> a[j];
			if (a[max] < a[j]) {
				max = j;
			}
		}
		if (a[max] * a[max] == a[0] * a[0] + a[1] * a[1] + a[2] * a[2] - a[max] * a[max])cout << "YES" << endl;
		else cout << "NO" << endl;
	}
    return 0;
}

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

void right(vector<int> &v) {
	if (pow(v[0], 2.0) + pow(v[1], 2.0) == pow(v[2], 2.0)) cout << "YES\n";
	else cout << "NO\n";
}

int main() {
	int t, n, i, j;
	cin >> n;
	vector<int> v;
	for (i = 0; i < n; i++) {
		for (j = 0; j < 3; j++) {
			cin >> t;
			v.push_back(t);
		}
		std::sort(v.begin(), v.end());
		right(v);
	}
	return 0;
}

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

using namespace std;

int main(){
    int N,a[3];
    cin >> N;
    for(int i = 0 ; i < N ; i++){
	for(int j = 0 ; j < 3 ; j++){
	    cin >> a[j];
	}
	sort(a, a+3);
	cout << (a[0]*a[0]+a[1]*a[1] == a[2]*a[2] ? "YES" : "NO") << endl;
    }
    return 0;
}

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

int main()
{
    double a,b,c,N;
    priority_queue< double, vector<double>, greater<double> > que;
    cin >> N;
    for(int i=0;i<N;i++) {
        cin >> a >> b >> c;
        que.push(a);
        que.push(b);
        que.push(c);
        a=que.top();
        que.pop();
        b=que.top();
        que.pop();
        c=que.top();
        que.pop();
        if (a*a+b*b==c*c) cout << "YES" << endl;
        else cout << "NO" << endl;
    }
    return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;


#define REP(i,n) for(ll i=0;i<n;++i)
#define RREP(i,n) for(ll i=n-1;i>=0;--i)
#define FOR(i,m,n) for(ll i=m;i<n;++i)
#define RFOR(i,m,n) for(ll i=n-1;i>=m;--i)
#define ALL(v) (v).begin(),v).end()

#define PB(a) push_back(a)
#define MOD 1000000007

typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> VI;
typedef vector<VI> VVI;
const double PI = 3.14159265358979323846;
const double EPS = 1e-12;
const int INF = numeric_limits<int>::max() / 2;
const int NEG_INF = numeric_limits<int>::min() / 2;

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);

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

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