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<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<ctime>
#include<cctype>
#include<climits>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<memory>
#include<functional>

#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define llong long long
#define pb(a) push_back(a)
#define INF 999999999
using namespace std;

typedef vector<int> vi;
typedef vector<long long> vl;
typedef vector<double> vd;
typedef pair<int, int> pii;
typedef pair<long, long> pll;
typedef long long ll;

int dy[] = { 0, 0, 1, -1, 0 };
int dx[] = { 1, -1, 0, 0, 0 };

int main(){
	ios::sync_with_stdio(false);

	vi len(3);
	int a, b;
	int n;

	cin >> n;

	REP(i, n){
		cin >> len[0] >> len[1] >> len[2];

		VSORT(len);
		a = len[0] * len[0] + len[1] * len[1];
		b = len[2] * len[2];

		if (a == b)
			puts("YES");
		else
			puts("NO");
	}
}

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

void swap(int *,int *);

int main(void)
{
	int a,b,c;
	int i,n;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d %d %d",&a,&b,&c);
		if(b<a)swap(&a,&b);
		if(c<b)swap(&b,&c);
		if(b<a)swap(&a,&b);
		if( (a/3*4==b) && (a/3*5==c)) printf("YES\n");
		else printf("NO\n");
	}
	return 0;
}

void swap(int *a,int *b){
	int work;
	work=*a;
	*a=*b;
	*b=work;
}

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

int pow2(int i) {
	return std::pow(i, (double) 2);
}

int main() {
	int in[3];
	while (std::cin >> in[0] >> in[1] >> in[2]) {
		std::sort(in, in + 3);
		if (pow2(in[2]) == pow2(in[0]) + pow2(in[1]))
			std::cout << "YES" << std::endl;
		else
			std::cout << "NO" << std::endl;
	}
}

C++: #include<iostream>
int main(){
	int n,a,b,c;
	std::cin>>n;
	while(n>0){
		std::cin>>a>>b>>c;
		if(a*a==b*b+c*c||b*b==a*a+c*c||c*c==a*a+b*b){
			std::cout<<"YES"<<std::endl;
		}
		else std::cout<<"NO"<<std::endl;
		n--;
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
void func(int*&p,int n)
{int i;
p=NULL;
p=new int[n];
for(i=0;i<n;i++)
p[i]=i;
}
int main()
{int *a,*b,*c,a1,b1,c1,i,j,t,n;
cin>>n;
func(a,n);
func(b,n);
func(c,n);
for(i=0;i<n;i++)
cin>>a[i]>>b[i]>>c[i];
for(i=0;i<n;i++)
{if(a[i]<b[i]){t=a[i];a[i]=b[i];b[i]=t;}
if(a[i]<c[i]){t=a[i];a[i]=c[i];c[i]=t;}
a1=a[i]*a[i];
b1=b[i]*b[i];
c1=c[i]*c[i];
if(a1==b1+c1)
cout<<"Case"<<i+1<<":"<<"Yes"<<endl;
else
cout<<"Case"<<i+1<<":"<<"No"<<endl;}
}

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

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

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

int max(int a, int b){
  if (a>b) return a;
  else return b;
}


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

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

int main()
{
	int n;
	cin>>n;
	while (n--)
	{
		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;

	}

}

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

 return 0;
}

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

bool solve(int x,int y, int z)
{
	if( (x * x) == (y * y + z * z) )
	{
		return true ;
	}

	return false ;
}

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

	bool ans = false ;

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

		if( a > b )
		{
			if( a > c )		// 最大値はa
			{
				ans = solve(a,b,c) ;
			}
			else if( a < c )	// 最大値はc
			{
				ans = solve(c,a,b) ;
			}
		}
		else if( a < b )
		{
			if( b > c )		// 最大値はb
			{
				ans = solve(b,a,c) ;
			}
			else if( b < c )	// 最大値はc
			{
				ans = solve(c,a,b) ;
			}
		}

		if( ans == true ){ cout << "YES" << endl ; }
		else{ cout << "NO" << endl ; }
	}
	return 0 ;
}

C++: #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <sstream>
#include <functional>
#include <numeric>
#include <cmath>
#include <cstring>
#include <queue>
#include <stack>
#include <set>

using namespace std;

#define ALL(co) co.begin(), co.end()

typedef long long LL;
typedef pair<int, int> P;
typedef pair<P, P> PP;
typedef vector<int> Array;
typedef vector<int> LArray;

const int INF = 1 << 29;
const LL LINF = 1LL << 60;

int itiv;
inline int getInt() { return (cin >> itiv, itiv); }
void readAll(Array& vec, int n) { for (int i = 0; i < n; i++) cin >> vec[i]; }
inline bool between(int first, int last, int n) { return first <= n && n <= last; }
inline bool inRange(int begin, int end, int n) { return begin <= n && n < end; }
inline bool inRange(int size, int n) { return 0 <= n && n < size; }

int m, n;
int dx[] = { -1, 0, 1, 0 }, dy[] = { 0, -1, 0, 1 };
int dr[] = { 0, -1, 0, 1 }, dc[] = { -1, 0, 1, 0 };


int main(void)
{
	while(cin >> n && n)
	{
		for (int i = 0; i < n; i++)
		{
			Array arr(3);
			readAll(arr, n);
			sort(ALL(arr));
			cout << (arr[2] * arr[2] == arr[0] * arr[0] + arr[1] * arr[1] ? "YES" : "NO") << endl;
		}
	}
	return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<functional>
#include<vector>
#include<math.h>
#define L(_i,_N) for(int _i=0;_i<_N;_i++)
typedef long long int lli;
using namespace std;

int main() {
	int N,Line[3];
	cin >> N;
	L(i, N) {
		L(j, 3) cin >> Line[j];
		sort(Line, Line + 3);
		if (pow(Line[0], 2) + pow(Line[1], 2) == pow(Line[2], 2)) cout << "Yes" << endl;
		else cout << "No" << endl;
	}
	return 0;
}

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

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

	cin >> N;
	for (int i = 0; i < N; ++i)
	{
		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;
		}
	}
}