Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func read() string {
	sc.Scan()
	return sc.Text()
}

func main() {
	// sc.Split(bufio.ScanLines)
	sc.Split(bufio.ScanWords)
	n, _ := strconv.Atoi(read())
	s := make([]int, 3)
	for i := 0; i < n; i++ {
		s[0], _ = strconv.Atoi(read())
		s[1], _ = strconv.Atoi(read())
		s[2], _ = strconv.Atoi(read())
		sort.Sort(sort.IntSlice(s))
		if (s[2] * s[2]) == ((s[0] * s[0]) + (s[1] * s[1])) {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

C++: #include<bits/stdc++.h>
using namespace std;
#define mp make_pair
#define fi first
#define se second
#define ll long long
#define pb push_back

# define inOut(a,b) freopen(a,"r",stdin);freopen(b,"w",stdout);
# define RESET(a) memset(a,0,sizeof(a))
# define MEMO(a) memset(a,-1,sizeof(a))
# define DEBUG puts("Debug-Has-Come-Until-Here")


typedef pair<int,int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;

int main(){
	cin.tie(NULL);

	int T, arr[5];
	scanf("%d", &T);
	while(T--){
		scanf("%d %d %d", &arr[1], &arr[2], &arr[3]);
		sort(arr+1, arr+4);
		if (arr[1]*arr[1] + arr[2]*arr[2] == arr[3]*arr[3])
			printf("YES\n");
		else
			printf("NO\n");
	}
	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;
			}
	}
	return(0);
}

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

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

    for (int i = 0;i <= times; i++) {
        int a, b, c;
        cin >> a >> b >> c;

        int a2, b2, c2;
        a2 = pow(a,2);
        b2 = pow(b,2);
        c2 = pow(c,2);

        if (a2 == b2 + c2 || b2 == a2 + c2 || c2 == a2 + b2) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }

    return 0;
}

C++: #include <iostream>
#include <cmath>
 
using namespace std;
 
int main(){
	int a, b, c, n;
	
	cin >> n;

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

	return 0;

}

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

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

int main(){

	int n,a[10000][3];

	cin>>n;

	for(int i=1;i<=n;i++){
		cin>>a[i][0]>>a[i][1]>>a[i][2];
	}

	for(int i=1;i<=n;i++){
		if(a[i][0]*a[i][0]==a[i][1]*a[i][1]+a[i][2]*a[i][2] || a[i][1]*a[i][1]==a[i][0]*a[i][0]+a[i][2]*a[i][2] || a[i][2]*a[i][2]==a[i][1]*a[i][1]+a[i][0]*a[i][0]){
			cout<<"YES"<<endl;
		}
		else{
			cout<<"NO"<<endl;
		}
	}

	return 0;
}

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

using namespace std;

int main()
{
	int n, x, y, z;

	scanf("%d", &n );

	for ( int i = 0; i < n; i++ )
	{
		scanf("%d %d %d", &x, &y, &z );

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

	return 0;
}

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

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

int main()
{
using namespace std;
	int i;
	scanf("%d",&i);

	for(;i>0;i--)
	{
		int l[3];
		scanf("%d %d %d",&l[0],&l[1],&l[2]);
		
		sort(l,l+3);
		if(l[2]*l[2]==l[0]*l[0]+l[1]*l[1])printf("YES\n");
		else printf("NO\n");

	}
	
return 0;

}

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

C++: #include<iostream>

int main(){
  int a,b,c;
  std::cin>>a;
  std::cin>>b;
  std::cin>>c;
  if (a*a==b*b+c*c) std::cout<<"YES";
  else if (b*b==a*a+c*c) std::cout<<"YES";
  else if (c*c==a*a+b*b) std::cout<<"YES";
  else std::cout<<"NO"<<std::endl;
  

	
	return 0;
}

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

vector<int> v(3);

void solve(){
	sort(v.begin(),v.end());
	if((v[2] * v[2]) == (v[1] * v[1] + v[0] * v[0])) cout << "YES" << endl;
	else cout << "NO" << endl;
}

int main(){
	int n;
	cin >> n;
	for(int j=1;j<=n;j++){
		for(int i=0;i<3;i++){
		cin >> v[i];
		}
		solve();
	}
	return 0;
}

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

int main() {
	int data_sets_num = 0;		//??\???????????????????????????????????°
	std::vector<string> result;
	
	cin >> data_sets_num;
	for (int i = 0; i < data_sets_num; i++) {
		int first, second, third;

		cin >> first >> second >> third;
		if (
			(first * first == second * second + third * third) ||
			(second * second == first * first + third * third) ||
			(third * third == second * second + first * first)
			) {
			result.push_back("YES");
		}
		else {
			result.push_back("NO");
		}
	}

	for (unsigned int j = 0; j < result.size(); j++) {
		cout << result[j] << endl;
	}

	return 0;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<cmath>
using namespace std;
int main() {
	int n;
	cin >> n;
	for (int i=0;i < n;i++) {

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



	
		
		
		
	}
}

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

int main() {
	int x, n, m, l;
	vector<string> v;
	
	cin >> x;

	for(int i = 0; i < x; i++) {
		cin >> n >> m >> l;

		if(l*l == n*n + m*m) {
			v.push_back("Yes");
		} else {
			v.push_back("No");
		}
	}

	for(int i = 0; i < v.size(); i++) {
		cout << v[i] << endl;
	}

	return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<string>
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];
		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++: //
//  main.cpp
//  b
//
//  Created by h3037178 on 2017/07/31.
//  Copyright ?? 2017??´ ?????£?????????. All rights reserved.
//

#include <iostream>
#include<algorithm>
#include<math.h>
using namespace std;
int main(){
    int n,a,i[3],f[3];
    cin>>n;
    if(n>1000){
        break;
    }
    for(int l=0;l<n;l++){
                for(a=0;a<3;a++){
            cin>>i[a];
            f[a]=i[a]^2;
        }
        if(i[a]<=0||i[a]>1000){
                break;
            }
        sort(f,f+3);
        if(f[2]==f[0]+f[1]){
            cout<<"YES"<<endl;
        }else{
            cout<<"NO"<<endl;
        }
    }
}

C++: #include <iostream>
#include <cmath>
#define REP(i,n) for(int i=0;i<n;i++)
using namespace std;

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