Go: package main

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

var sc = bufio.NewScanner(os.Stdin)
var out = bufio.NewWriter(os.Stdout)

func main() {
	sc.Split(bufio.ScanWords)
	defer out.Flush()
	n := nextInt()
	for i := 0; i < n; i++ {
		data := nextInts(3)
		fmt.Fprintln(out, checkTriangle(data))
	}
}

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

func nextInt() int {
	a, _ := strconv.Atoi(next())
	return a
}

func nextInts(n int) []int {
	a := make([]int, n)
	for i := 0; i < n; i++ {
		a[i] = nextInt()
	}
	return a
}

func checkTriangle(i []int) string {
	if checkSt(i[0], i[1], i[2]) || checkSt(i[1], i[2], i[0]) || checkSt(i[2], i[0], i[1]) {
		return "YES"
	}
	return "NO"
}
func Sq(x int) int {
	return x * x
}

func checkSt(a, b, c int) bool {
	return (Sq(a) + Sq(b)) == Sq(c)
}

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

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

C++: #include <cstdio>
#include <queue>
#include <vector>

using namespace std;

bool Check(int n,int m,int l){
	if(n == m && m == l && l == n){ return false; }
	priority_queue<int> q;
	q.push(n);
	q.push(m);
	q.push(l);
	int a,b,c;
	c = q.top();
	q.pop();
	b = q.top();
	q.pop();
	a = q.top();
	q.pop();
	if(a * a + b * b == c * c){
		return true;
	}else{
		return false;
	}
}

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(Check(a,b,c)){
			printf("YES\n");
		}else{
			printf("NO\n");
		}
	}
	return 0;
}

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

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

C++: #include<stdio.h>
#include<math.h>
int main(void)
{
	int n,i,w[1000],a[1000],s[1000],d[1000],x[1000];
	while(scanf("%d",&n)!=EOF){
		for(i=0;i<n;i++){
			scanf("%d %d %d",&a[i],&s[i],&d[i]);
			w[i]=(a[i]*a[i])+(s[i]*s[i]);
			x[i]=d[i]*d[i];
		}
		for(i=0;i<n;i++){
			if(w[i]==x[i]){
				printf("YES\n");
			}
			else{
				printf("NO\n");
			}
		}	
	}
	return 0;
}

C++: #include "bits/stdc++.h"

#define REP(i,num) for(int i=0;i<(num);++i)
#define ALL(c) c.begin(),c.end()
#define PRINTALL(c) for(auto& x:c){cout<<x<<' ';}cout<<endl;
#define PAIRCOMP(c,comp) [](const pair<ll,ll>& lhs,const pair<ll,ll>& rhs){return lhs.c comp rhs.c;}

using namespace std;
using ll = long long;

constexpr ll atcoder_mod = 1e9+7;

template<typename T=int>
T in(){T x; cin >> x; return (x);}
template<typename T=int,typename C=vector<T>>
C vecin(int N){C x(N);REP(i,N){x[i]=in<T>();}return move(x);}

void vout(){cout << endl;}
template<typename Head,typename... Tail>
void vout(Head&& h,Tail&&... t){cout << ' ' << h;vout(forward<Tail>(t)...);}
void out(){cout << endl;}
template<typename Head,typename... Tail>
void out(Head&& h,Tail&&... t){cout << h;vout(forward<Tail>(t)...);}

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	auto N=in();
	REP(i,N){
		auto v=vecin(3);
		sort(ALL(v));
		if(v[0]*v[0]+v[1]*v[1]==v[2]*v[2]) out("YES");
		else out("NO");
	}
	return 0;
}

C++: #include<stdio.h>

int main()
{
	int input_num;
	scanf("%d", &input_num);
	while(0 < input_num--)
	{
		int sides[3];
		scanf("%d %d %d", &sides[0], &sides[1], &sides[2]);

		for(int i = 0; i < 2; i++)
		{
			if(sides[i] > sides[i+1])
			{
				int swap = sides[i];
				sides[i] = sides[i+1];
				sides[i+1] = swap;
 			}
		}
		printf("%s\n", (sides[0]*sides[0]+sides[1]*sides[1]==sides[2]*sides[2]) ? "YES" : "NO");
	}
	return 0;
}

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

int main(){
	int n, a, b, c, x, y, z;
	
	cin >> n;
	for(int i = 0; i < n; i++){
		cin >> a >> b >> c;
		int sum = a + b + c;
		x = max(a,max(b,c));
		y = min(a,min(b,c));
		z = sum - x - y;
		
		if((y*y) + (z*z) == x*x)
			cout << "Yes" << endl;
		else
			cout << "No" << endl;
	}
	
    return 0;
}

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

using namespace std;

int main () {
	int n;

	cin >> n;

	int henA, henB, henC;
	for (int i = 0; i < n; i++) {
		cin >> henA >> henB >> henC;

		if(henA > henC ) {			
			swap(henA, henC);
		}

		if(henB > henC ){
			swap(henB, henC);
	}

		if (henA * henA + henB * henB == henC * henC)
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}

	return 0;
}

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

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

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

C++: #include <iostream>
#include <algorithm>
using namespace std; 
int main() {
  int n;
  cin >> n;
  for(int i=0; i<n; i++) {
    int a[3];
    for(int j=0; j<3; j++) {
      cin >> a[j];
    }
    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>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>	// require sort next_permutation count __gcd reverse etc.
#include <cstdlib>	// require abs exit atof atoi 
#include <cstdio>		// require scanf printf
#include <functional>
#include <numeric>	// require accumulate
#include <cmath>		// require fabs
#include <climits>
#include <limits>
#include <cfloat>
#include <iomanip>	// require setw
#include <sstream>	// require stringstream 
#include <cstring>	// require memset
#include <cctype>		// require tolower, toupper
#include <fstream>	// require freopen
#include <ctime>		// require srand
#define rep(i,n) for(int i=0;i<(n);i++)
#define ALL(A) A.begin(), A.end()

using namespace std;

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

int main()
{
//	cut here before submit 
//	freopen ("testcase.IRT", "r", stdin );
	int n;
	scanf ("%d", &n );

	rep (i, n ){
		bool ok = false;
		int side[3] = {0};
		rep (j, 3 ){
			scanf ("%d", &side[j] );
		} // end rep
		sort (side, side+3 );
		if (side[0] == 0 || side[1] == 0 || side[2] == 0 ) ok = false;
		else
		if (side[2] > side[0] + side[1] ) ok = false;
		if (side[2]*side[2] == side[0]*side[0] + side[1]*side[1] ) ok = true;

		cout << (ok ? "YES" : "NO" ) << endl;
	} // end rep

	return 0;
}