Go: // 九九を出すだけ
package main
import (
	"fmt"
	"os"
	"bufio"
	"strconv"
	"sort"
)

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)
	    sort.Ints(data)
	    if data[0]*data[0]+data[1]*data[1] == data[2]*data[2]{
	        fmt.Fprintln(out, "YES")
	    }else{
	        fmt.Fprintln(out, "NO")
	    }
	}
}

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
}

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

void readAll(Array& vec, int n) { for (int i = 0; i < n; i++) cin >> vec[i]; }

int m, n;


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;
	}
	return 0;
}

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

using namespace std;

bool isRightTriangle(int a, int b, int c)
{
	return (a * a == b * b + c * c);
}

int main()
{
	int n;
	scanf("%d", &n);

	for (int i = 0; i < n; i++){
		vector<int> triangle;
		for (int j = 0; j < 3; j++){
			int edge;
			scanf("%d", &edge);
			triangle.push_back(edge);
		}
		sort(triangle.begin(), triangle.end());
		puts(isRightTriangle(triangle[2], triangle[1], triangle[0]) ? "YES" : "NO");
	}
	return (0);
}

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

int main() {
  int n,a,b,c;
  std::cin >> n;
  for(int i=0;i<n;i++) {
    scanf("%d %d %d", &a, &b, &c); 
    std::vector<int> v;
    v.push_back(a);
    v.push_back(b);
    v.push_back(c);
    sort(v.begin(),v.end());
    if((a*a)+(b*b)==(c*c)) {
      std::cout << "YES" << std::endl;
    }
    else {
      std::cout << "NO" << std::endl;
    }
  }
}

C++: #include <iostream>
#include <stdio.h>
#include <vector>
#include <algorithm>
#include <math.h>

int main() {
    int n;
    std::vector<int> V;
    
    scanf("%d", &n);
    for (int i = 0; i < n; i++) {
        int a, b, c; std::cin >> a >> b >> c;
        V.push_back(pow(a,2)); V.push_back(pow(b, 2)); V.push_back(pow(c, 2));
        std::sort(V.begin(), V.end());
        if (v[2] == v[1] + v[0]) printf("YES\n");
        else printf("NO\n");
    }
    
    return 0;
}

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

int main()
{
	vector <int> v_c;
	v_c.resize(3);
	double e =2.0;
	int N;
	//data set
	cin >> N;
	for(int i = 0; i < N; ++i)
	{
		cin >> v_c[0] >> v_c[1] >> v_c[2];
		sort(v_c.begin(),v_c.end(),greater<int>());
		if( pow(v_c[0],e) == (pow(v_c[1],e)+pow(v_c[2],e)))
		{
			cout << "YES"<<endl;
		} else {
			cout << "NO" << endl;
		}
	}
	return 0;
}

C++: #include <cstdio>
#include <iostream>
#include <cmath>
#include <ctype.h>
#include <string> 
#include <sstream>
#include <iostream>
#include <algorithm>
#include <cstdlib>
#include <map>
#include <queue>
#include <utility>
#include <vector>
#include <set>
#include <list>
#include <cstring>
#include <stack>
   
using namespace std;

bool solve(int a, int b, int c)
{
    return (a * a + b * b == c * c);
}

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

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

#define FOR(i,a,b) for (ll i=(a),__last_##i=(b);i<__last_##i;i++)
#define RFOR(i,a,b) for (ll i=(b)-1,__last_##i=(a);i>=__last_##i;i--)
#define REP(i,n) FOR(i,0,n)
#define RREP(i,n) RFOR(i,0,n)
#define __GET_MACRO3(_1, _2, _3, NAME, ...) NAME
#define rep(...) __GET_MACRO3(__VA_ARGS__, FOR, REP)(__VA_ARGS__)
#define rrep(...) __GET_MACRO3(__VA_ARGS__, RFOR, RREP)(__VA_ARGS__)
template<typename T> ostream& operator<<(ostream& os, const vector<T>& v) {
   REP(i, v.size()) { if (i)os << " "; os << v[i]; }return os;
}
template<typename T> ostream& operator<<(ostream& os, const vector<vector<T>>& v) {
   REP(i, v.size()) { if (i)os << endl; os << v[i]; }return os;
}

using namespace std;


void solve();

int main() {

   solve();
   return 0;

}

void solve() {

	vector<ll> v(3);
	ll n;

	cin >> n;

	REP(i, n) {
		cin >> v[0] >> v[1] >> v[2];
		cout << (v[0]*v[0]+v[1]*v[1]==v[2]*v[2] || v[0]*v[0]+v[2]*v[2]==v[1]*v[1] || v[1]*v[1]+v[2]*v[2]==v[0]*v[0]? "YES": "NO") << endl;
	}

}

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

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

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

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;
    for(int l=0;l<n;l++){
        for(a=0;a<3;a++){
            cin>>i[a];
            if(i[a]<=0){
                break;
            }
            f[a]=i[a]^2;
        }
        sort(f,f+3);
        if(f[2]==f[0]+f[1]){
            cout<<"Yes"<<endl;
        }else{
            cout<<"No"<<endl;
        }
    }
}

C++: #include<stdio.h>
int main(void)
{
	int n=0;
	int i=0;
	int a[1001]={0},b[1001]={0},c[1001]={0};
	int irekae=0;
	int irekae2=0;

	scanf("%d",&n);
	for (i=1;i<=n;i++)
	{
		scanf("%d",&a[i]);
		scanf("%d",&b[i]);
		if (a[i]>b[i])
		{
			irekae=a[i];
			a[i]=b[i];
			b[i]=irekae;
		}
		scanf("%d",&c[i]);
		if (a[i]>c[i])
		{
			irekae=a[i];
			irekae2=b[i];
			a[i]=c[i];
			b[i]=irekae;
			c[i]=irekae2;
		}
		if (a[i]%3==0&&b[i]%4==0&&c[i]%5==0)
		{
			printf("Yes\n");
		}
		else
		{
			printf("No\n");
		}
	}


	return 0;
}

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

int sq(int x){return x*x;}
int main(){
  int n;
  cin>>n;
  for(int i=0;i<n;i++){
    int a,b,c;
    cin>>a>>b>>c;
    cout<<(sq(max([a,b,c]))*2==sq(a)+sq(b)+sq(c) ? "YES" :"NO")<<endl;
  }
  return 0;
}