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 <bits/stdc++.h>

using namespace std;


#define REP(i, n) for(int i = 0; i < n; i++)
#define VSORT(v) sort(v.begin(), v.end())

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    int n;
    cin >> n;
    while (n--) {
        vector<int> a(3);
        REP(i, 3)cin >> a[i];
        VSORT(a);
        if (a[2] * a[2] == a[0] * a[0] + a[1] * a[1]) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }
    return 0;
}

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

int main(int argc, const char *argv[]) {
    int n;
    std::cin >> n;
    int a, b, c, a2, b2, c2;
    for (int i = 0; i < n && std::cin >> a >> b >> c; i++) {
        a2 = a * a;
        b2 = b * b;
        c2 = c * c;
        if (a2 == b2 + c2 || b2 == c2 + a2 || c2 == a2 + b2) {
            std::cout << "YES" << std::endl;
        } else {
            std::cout << "NO" << std::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<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 <set>
#include <map>
#include <list>
#include <iterator>
#include <queue>
#include <stack>
#include <deque>
#include <sstream>
#include <algorithm>
#include <numeric>
#include <string>
#include <cmath>
#include <complex>
#include <functional>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cassert>
#include <cstdlib>
#include <cctype>
#define REP(i,m,n) for(int i=m;i<n;i++)
#define rep(i,n) for(int i=0;i<n;i++)
#define rp(i,c) rep(i,(int)c.size())
#define fr(i,c) for(__typeof((c).begin()) i=(c).begin();i!=(c).end();i++)
#define mp make_pair
#define pb push_back
#define all(c) (c).begin(),(c).end()
#define rall(u) (u).rbegin(),(u).rend()
#define dbg(x) cerr<<#x<<" = "<<(x)<<endl
#define v_delete(a,b) (a).erase(remove((a).begin(), (a).end(), b), (a).end())
#define v_unique(a) (a).erase(unique((a).begin(), (a).end()), (a).end())
#define VV(T) vector<vector< T > >
#define init(a,b) memset((a), (b), sizeof((a)))
using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> pi;
const int inf=1<<28;
const double INF=1e10,EPS=1e-9;


template<class T>int SIZE(T a){return a.size();}
template<class T>string IntToString(T num){string res;stringstream ss;ss<<num;return ss.str();}
template<class T>T StringToInt(string str){T res=0;for(int i=0;i<SIZE(str);i++)res=(res*10+str[i]-'0');return res;}
template<class T>T gcd(T a,T b){if(b==0)return a;return gcd(b,a%b);}
template<class T>T lcm(T a,T b){return a/gcd(a,b)*b;}

template <class T> void input(T& a, int n) { for (int i = 0; i < n; ++i) cin >> a[i]; }
template <class T> void input(T* a, int n) { for (int i = 0; i < n; ++i) cin >> a[i]; }
typedef pair<int,int> pii;

inline bool IN(int x, int y, int w, int h)
{
    return 0 <= x && x < w && 0 <= y && y < h;
}


int main()
{
	int n;
	cin >> n;
		rep(nn,n){
			int l[3];
			rep(i,3){
				cin >> l[i];
			}
			sort(l,l+3);
			if(pow(l[2],2.0)==pow(l[1],2.0)+pow(l[0],2.0)){
				cout << "YES" << endl;
			}else{
				cout << "NO" << endl;
			}

		}

	return 0;
}

C++: #include <stdio.h>

int main(void)
{
	int a,b,c;
	int i;
	
	while(1)
	{
		scanf("%d %d %d",&a,&b,&c);
		
		if(0.0 == (double)(a*a + b*b - c*c)/(2*a*b))
		{
			printf("YES\n");
		}
		else if(0.0 == (double)(b*b + c*c - a*a)/(2*b*c))
		{
			printf("YES\n");
		}
		else if(0.0 == (double)(c*c + a*a - b*b)/(2*c*a))
		{
			printf("YES\n");
		}
		else
		{
			printf("NO\n");
		}
	}
	return 0;
}

C++: #include<stdio.h>

int main(){
        int i = 0;
        int tmp;
        int n,len[3];
        scanf("%d",&n);
        while(i != n){
                scanf("%d %d %d",&len[0],&len[1],&len[2]);
                if(len[0] > len[1]){
                        tmp = len[0];
                        len[0] = len[1];
                        len[1] = tmp;
                }
                
                if(len[1] > len[2]){
                        tmp = len[1];
                        len[1] = len[2];
                        len[2] = tmp;
                }
                if(len[0] * len[0] + len[1] * len[1] == len[2] * len[2]){
                        printf("YES\n");
                }else{
                        printf("NO\n");
                }
                i++;
        }
        return 0;
}

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

#define FOR(i,a,b) for(long long int i=(a);i<(b);i++)
#define REP(i,n) for(long long int i=0;i<(n);i++)
#define ALL(s) (s).begin(),(s).end()

#define PI 3.14159265358479

typedef long long int ll;
typedef vector<long long int> vi;

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

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

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

  for (int i = 0; i < num; i++) {
    int A, B, C;
    scanf("%d %d %d", &A, &B, &C);

    if (A*A+B*B == C*C || A*A+C*C == B*B || B*B+C*C==A*A) {
      printf("YES\n");
    } else {
      printf("NO\n");
    }
  }

}

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

int main()
{
    long long int a,b,c,n;
    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;
        }

    }
    return 0;
}

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

int main() {
    
    // 1. input.
    int N;
    cin >> N;
    
    // 2. output answer.
    for(int i = 0; i < N; i++){
        int a, b, c;
        cin >> a >> b >> c;
        bool isRight = false;
        if(a * a + b * b == c * c) isRight = true;
        if(b * b + c * c == a * a) isRight = true;
        if(c * c + a * a == b * b) isRight = true;
        if(isRight) cout << "YES" << endl;
        else        cout << "NO"  << endl;
    }
    
    return 0;
    
}

C++: #include <iostream>
using namespace std;
 
int main()
{
    int N,a,b,c,i,j;
    cin>>N;
    int A[3*N];
    for(i=0;i<N;i++)
    {
        int a,b,c;
        cin>>a>>b>>c;
        j=3*i;
        A[j] = a;
        A[j+1] = b;
        A[j+2] = c;
        
    }
    for (i=0;i<3*N;i=i+3)
    {
        if (A[i]*A[i]==A[i+1]*A[i+1]+A[i+2]*A[i+2] || A[i+1]*A[i+1]==A[i]*A[i]+A[i+2]*A[i+2] || A[i+2]*A[i+2]==A[i]*A[i]+A[i+1]*A[i+1])
        cout<<"YES"<<"\n";
        else
        cout<<"NO"<<"\n";
    }
}