Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func main() {
	sc.Split(bufio.ScanWords)
	li := make([]int, 3)

	sc.Scan()
	N, _ := strconv.Atoi(sc.Text())

	for i := 0; i < N; i++ {
		for j := 0; j < 3; j++ {
			sc.Scan()
			x, _ := strconv.Atoi(sc.Text())
			li[j] = x
		}
		sort.Ints(li)

		switch li[2]*li[2] == li[1]*li[1]+li[0]*li[0] {
		case true:
			fmt.Println("YES")
		case false:
			fmt.Println("NO")
		default:
		}
	}

}

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

int main()
{
	int a, b, c, d, e;
	int ans;
	
	cin >> d;
		for(int i = 0; i < d; i++)
		{
			cin >> a >> b >> c;
			
			if(a > b && a > c)
			{
					e = c;
					c = a ;
					
					ans = c * c - e * e - b * b;
				if(ans == 0)
				{
					cout << "YES" << endl;
				}
				else
				{
					cout << "NO" << endl;
				}
			}
	
			else if (b > c && b > a)
			{
				e = c;
				c = b;
			
					ans = c * c - e * e - a * a;
					if(ans == 0)
					{
						cout << "YES" << endl;
					}
					else
					{
						cout << "NO" << endl;
					}
			}
			else 
			{
				ans = c * c - a * a - b * b;
				if(ans == 0)
				{
					cout << "YES" << endl;
				}
				else
				{
					cout << "NO" << endl;
				}
			}
		}
			
	return 0;
}

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

C++: #include<bits/stdc++.h>
using namespace std;
int a,b,c,n,i;
int main(){
	cin>>n;
	for(i=0;i<n;i++){
	  cin>>a>>b>>c;
	  if(a>b){
		swap(a,b);
	  }
	  if(a>c){
	    swap(a,c);
	  }
	  if(b>c){
	    swap(b,c);
	  }
	  if(c*c==a*a+b*b){
		   cout<<"YES"<<endl;
	  }
	  else{
		  cout<<"NO"<<endl;
	  }
    }
}

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


long long a,b,c,n;

int main(){
	cin>>n;
	long long maxs=0;
	for(int i=0;i<n;i++){
		cin>>a>>b>>c;
		int total=a+b+c;
		maxs=max(a,b);
		maxs=max(maxs,c);

		 if(maxs==c){
			if(c*c==(a*a+b*b)) cout<<"YES"<<endl;
			else cout<<"NO"<<endl;
		}
		else if(maxs==b){
			if(b*b==(a*a+c*c)) cout<<"YES"<<endl;
			else cout<<"NO"<<endl;
		}
		else if(maxs==a){
			if(a*a==(c*c+b*b)) cout<<"YES"<<endl;
			else cout<<"NO"<<endl;
			}
		}
	}

C++: #include <bits/stdc++.h>
using namespace std;
int main() {
    int T;
    cin >> T;
    while(T--){
        int a,b,c;
        cin >> a >> b >> c;
        if( a > b ) swap(a, b);
        if( b > c ) swap(b, c);
        if( a > b ) swap(a, b);
        if( a * a + b * b == c * c ){
            cout << "YES" << endl;
        }else{
            cout << "NO" << endl;
        }
    }
}

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

int main() {
  int N; cin >> N;
  while(N--) {
    int a[3];
    for(int i = 0; i < 3; i++) cin >> a[i];
    sort(a, a + 3);
    if(a[2]*a[2] == a[0]*a[0] + a[1]*a[1]) {
      cout << "YES" << endl;
    }
    else {
      cout << "NO" << endl;
    }
  }
}

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

using namespace std;

int main()
{
	int n;
	int a,b,c; //a^2+b^2=c^2

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

}

C++:  #include<iostream>
 #include<fstream>
 #include<utility>

 using namespace std;

 int main(){
     int a, b, c, n, i;
     string str;

     getline(cin,str);
     sscanf(str.c_str(),"%d",&n);
     if(n < 0 || 1000 < n){
         return 0;
     }

     for(i=0;i<n;i++){
         getline(cin,str);
         sscanf(str.c_str(),"%d %d %d",&a,&b,&c);
         if(a < b){
             swap(a,b);
         }
         if(a < c){
             swap(a,c);
         }
         if(a <= 1000 && 1 <= b && 1 <= c){
             if(a*a == b*b + c*c){
                 cout << "YES" << endl;
             }else{
                 cout << "NO" << endl;
             }
         }else{
             cout << "ERROR: wrong type data input" << endl;
         }
     }
     return 0;
 }

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

typedef long long ll;
typedef pair<ll, ll> P;

#define pb push_back
#define rep(i, n) for(int i = 0; i < (n); i++)
#define dep(i, a, n) for(int i = a; i >= (n); i--)
#define FOR(i, a, n) for(int i = a; i < (n); i++)
#define mod (ll)(1e9+7)
#define int ll
#define INF 100000000

__attribute__((constructor))
void initial() {
  cin.tie(0);
  ios::sync_with_stdio(false);
}

signed main() {
	ll n, a;
  cin >> n;
  rep(i, n) {
    vector<int> ch;
    rep(j, 3) {
      cin >> a;
      ch.pb(a);
    }
    sort(ch.begin(), ch.end());
    if(pow(ch[0], 2) + pow(ch[1], 2) == pow(ch[2], 2)) 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||a*a+c*c==b*b||b*b+c*c==a*a){
      cout << "YES" << endl;
    }else{
      cout << "NO" << endl;
    }
  }
   


 return 0;
}

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

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

#include <iostream>

int compare_int(const void* a, const void* b) {
    return * (int*) a - * (int*) b;
}

int ni(int tg) {
	return pow((double) tg, 2);
}

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

	for (int i = 1; i <= n; i++) {
		const int size = 3;
		int in[size];
		std::cin >> in[0] >> in[1] >> in[2];

		qsort(in, size, sizeof(int), compare_int);

		if (ni(in[0]) + ni(in[1]) == ni(in[2]))
			std::cout << "YES" << std::endl;
		else
			std::cout << "NO" << std::endl;
	}
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
int main() {
	int a[3]; //a[0],a[1],a[2]
	int n;
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> a[0] >> a[1] >> a[2];
		sort(a, a + 2);
		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 s[4];
int main(){
	int n;
	cin>>n;
	for(int i=1;i<=n;i++){
	cin>>s[1]>>s[2]>>s[3];
	sort(s+1,s+4);
	int a= (s[1]*s[1])+(s[2]*s[2]);
	if(s[3]*s[3]==a)
	{cout<<"YES"<<endl;}
	else {
		cout<<"NO"<<endl;
	}
}
}

C++: #include <stdio.h>

int main(){
	int i,j;
	int a,b,c;
	int tmp;
		
	scanf("%d\n",&j);
	
	for(i=0;i<j;i++){
		scanf("%d %d %d\n",&a,&b,&c);
		if(a>b){
			tmp = a;
			a=b;
			b=tmp;
		}
		if(b>c){
			tmp=b;
			b=c;
			c=tmp;
		}
		if(c*c==a*a+b*b){
			printf("YES\n");
		}
		else{
			printf("NO\n");
		}
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
int n;
int main()
{
	cin >> n;
	int i, a[1000], b[1000], c[1000], x[1000], y[1000], z[1000], res[1000];
	for (i = 0; i < n; i++) {
		cin >> a[i] >> b[i] >> c[i];
		x[i] = a[i];
		if (x[i] < b[i]) {
			y[i] = x[i];
			x[i] = b[i];
		}
		else {
			y[i] = b[i];
		}
		if (x[i] < c[i]) {
			z[i] = y[i];
			y[i] = x[i];
			x[i] = c[i];
		}
		else if (y[i] < c[i]) {
			z[i] = y[i];
			y[i] = c[i];
		}
		else {
			z[i] = c[i];
		}
	}
	for (i = 0; i < n; i++) {
		res[i] = x[i] * x[i] - z[i] * z[i] - y[i] * y[i];
		if (res[i] == 0) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}
	return 0;
}