Go: package main

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

func main() {
	n, _ := strconv.Atoi(strScan())
	scanner := bufio.NewScanner(os.Stdin)
	for i := 0; i < n; i++ {
		scanner.Scan()
		strArr := strings.Fields(scanner.Text())
		castNumArr := StringToInt(strArr)
		fmt.Println(checkTriangle(castNumArr))
	}
}

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)
}

func StringToInt(s []string) []int {
	var i []int
	for _, v := range s {
		castNum, err := strconv.Atoi(v)
		if err != nil {
			panic(err)
		}
		i = append(i, castNum)
	}
	return i
}

func strScan() (stringInput string) {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	stringInput = scanner.Text()
	return
}

C++: //include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <fstream>
#include <complex>
#include <math.h>
using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

//math
//-------------------------------------------
template<class T> inline T sqr(T x) {return x*x;}

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef pair<long, long> PLL;
typedef long long LL;
//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

//repetition
//------------------------------------------
#define FOR(i,a,b) for(long i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

//constant
//--------------------------------------------

//clear memory
#define CLR(a) memset((a), 0 ,sizeof(a))

const long double EPS = 1e-30;
const double INF = 1e12;

long double to_deg(long double r) {
    return r * 180.0 / (atan(1.0) * 4.0);
}
int main(){
	int a,b,c,T;
	cin>>T;
	REP(i,T){
		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++: 
#include<stdio.h>
#include<math.h>
int main()
{
    int n,i;
    int a[1000],b[1000],c[1000];
    scanf("%d",&n);
    for(i=0;i<n;i++){
        scanf("%d%d%d",&a[i],&b[i],&c[i]);
    }
    for(i=0;i<n;i++){
        if((c[i]*c[i])==(a[i]*a[i]+b[i]*b[i])||(a[i]*a[i])==(b[i]*b[i]+c[i]*c[i])||(b[i]*b[i])==(a[i]*a[i]+c[i]*c[i])){
            printf("YES\n");
        }else{
            printf("NO\n");
        }
    }
    return 0;
}

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

int main()
{
    int num;
    std::cin >> num; 
    int edge[3];

    for(int i = 0; i < num; i++) {

        std::cin >> edge[0] >> edge[1] >> edge[2];

        // "edge" to "edge+3" ha "array edge" no memory jyou no
        // adress no hajimari to owari wo simesu. 
        // Yoku miru to kou natteru ==> [hajimari, owari)
        std::sort(edge, edge + 3);

        if(edge[2] * edge[2] == edge[0] * edge[0] + edge[1] * edge[1]) {
            std::cout << "YES" << std::endl;
        } else {
            std::cout << "NO" << std::endl;
        }

    }
}

C++: using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CSharpPractice
{
	class Program
	{
		static bool IsRightTriangle(int a, int b, int c)
		{
			return a * a + b * b == c * c;
		}
		static void Main(string[] args)
		{
			int n = int.Parse(Console.ReadLine());
			for (int j = 0; j < n; j++)
			{
				List<int> list = new List<int>();
				foreach (string val in Console.ReadLine().Split(' '))
				{
					list.Add(int.Parse(val));
				}
				bool flg = false;
				for (int i = 0; i < 3; i++)
				{
					flg |= IsRightTriangle(list[i], list[(i + 1) % 3], list[(i + 2) % 3]);
				}
				Console.WriteLine(flg ? "YES" : "NO");
			}
		}
	}
}

C++: #include <iostream>                                             
#include <cmath>                                                
#include <queue>                                                
using namespace std;                                            
                                                                
int main() {                                                    
  int N;                                                        
  cin >> N;                                                     
  priority_queue<int> data;                                     
  while (N--) {                                                 
    int a, b, c;                                                
    cin >> a >> b >> c;                                         
    data.push(a);                                               
    data.push(b);                                               
    data.push(c);                                               
    a = data.top();                                             
    data.pop();                                                 
    b = data.top();                                             
    data.pop();                                                 
    c = data.top();                                             
    data.pop();                                                 
    if (pow(a,2)==pow(b,2)+pow(c,2)) {                          
      cout << "YES" << endl;                                    
    } else {                                                    
      cout << "NO" << endl;                                     
    }                                                           
  }                                                             
  return 0;                                                     
}

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

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

C++: #include<iostream>
#include<math.h>
#include<algorithm>
using namespace std;
int main(){
    int n,a[3],b[3],c,i[3],f[3],j,max,l,k,gou=0,gou2;
    float opi=4;
    cin>>n;
    for(l=0;l<n;l++){
        for(k=0;k<3;k++){
            cin>>a[k];
            if(a[k]>1000||a[k]<=0||l>1000){
                break;
            }
            b[k]=a[k]^2;
        }
        sort(b,b+3);
        if(b[2]==b[0]+b[1]){
            cout<<"YES"<<endl;
        }
        else{
            cout<<"NO"<<endl;
        }
    }
}