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 <iostream>
#include <string>
#include <cmath>
using namespace std;


string Judge_triangle(int a,int b,int c){
    if(a+b>c && b+c>a && c+a>b){
        return "YES";
    }
    else{
        return "NO";
    }
}

bool Judge_line(int x){
    if(x<1 || x>1000 || ceil(x) != floor(x))
        return true;
    else
        return false;
}

int main(){
  int N;
  int a,b,c;
  int n=0;
    
    while(1){

  cin >> N;
    
        if(N > 1000 || ceil(N) != floor(N)){
            
        }
    else
        break;
    }
    
    string x[N];

while(N > 0 && cin >> a >> b >> c){
    
    
    while(1){
        if(Judge_line(a) && Judge_line(b) && Judge_line(c)){
            
            break;
        }
        
        else{
            x[N-1] = Judge_triangle(a,b,c);
            N--;
            n++;
            break;
        }
  }
}
    for(int i = 0;i < n;i++)
        cout << x[i] << endl;
    
  return 0;
}

C++: # include<iostream>

using namespace std;

int main(){
    int N(0);
    cin >> N;
    
    int answer[N];
    int i(0);
    
    while(i < N){
        int a(0), b(0), c(0);
        cin >> a >> b >> c;
    
        answer[i] = 0;
        
        if (a > b && a > c){
            if(b*b + c*c == a*a) answer[i] = 1;
        }if (b > c && b > a){
            if(c*c + a*a == b*b) answer[i] = 1;
        }if (c > a && c > b){
            if(a*a + b*b == c*c) answer[i] = 1;
        }
        i++;
    }
    
    for(i=0; i<N;i++){
        if(answer[i] == 1) printf("YES\n");
        else printf("No\n");
    }
    
}

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

using namespace std;

int main(void){
  int deta;
  //データ数をもらう
  scanf("%d", &deta);

  //データ数だけ３辺の値をもらう
  for(int i = 0; i < deta; i++){
    int hen1, hen2, hen3;
    scanf("%d", &hen1);
    scanf("%d", &hen2);
    scanf("%d", &hen3);

    //直角三角形の判定
    if(hen1*hen1 + hen2*hen2 == hen3*hen3 ||
       hen2*hen2 + hen3*hen3 == hen1*hen1 ||
       hen3*hen3 + hen1*hen1 == hen2*hen2){
      printf("yes\n");
    }else{
      printf("no\n");
    }

    
  }


  return 0;
}

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

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

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

C++: #include <iostream>

using namespace std;

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

  for (int i = 0; i < N; i++) {
    int a[3];
    cin >> a[0] >> a[1] >> a[2];

    int max = 0;
    for (int i = 0; i < 3; i++) {
      max = a[i] > max ? a[i] : max;
    }

    for (int i = 0; i < 3; i++) {
      a[i] = a[i] == max ? 0 : a[i];
    }

    max *max == a[0] * a[0] + a[1] * a[1] + a[2] * a[2] ? cout << "YES" << endl
                                                        : cout << "NO" << endl;
  }

  return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<string>
#include <math.h>
using namespace std;
string j(int a[3])
{

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

C++: #include <iostream>
#include <vector>
#include <string>
using namespace std;
int main() {
  int n;
  while(cin >> n) {
    vector<string> ans;
    for (int i = 0; i < n; ++i) {
      int x, y, z;
      cin >> x >> y >> z;
      if (x < y + z && y < z + x && z < x + y) {
        ans.push_back("YES");
      } else {
        ans.push_back("NO");
      }
    }
    for (int i = 0; i < n; ++i) {
      cout << ans[i] << endl;
    }
  }
  return 0;
}

C++: // aoj-0003.cpp

#include <cstdio>

int main() {
	int i, j;
	int sets, x, y, z;

	// read numbers of data sets
	scanf("%d", &sets);
	
	// read data set
	for (i=0; i<sets; ++i) {
		scanf("%d %d %d", &x, &y, &z);
		if (((x * x) + (y * y)) == (z * z)) {
			puts("YES");
		} else {
			puts("NO");
		}
	}
	
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main(){
    int N;
    cin >> N;
    vector<int> vec(3);
    for(int i =0;i<N;++i){   
        cin >> vec.at(0) >> vec.at(1) >> vec.at(2);
        sort(vec.begin(), vec.end() );
        if( vec.at(0)*vec.at(0) + vec.at(1)*vec.at(1) ==vec.at(2)*vec.at(2) ){
            cout << "YES" << endl;
        }
        else{
            cout << "NO" <<endl;
        }
    }

}

C++: #include <iostream>			//std::cout, std::cin
#include <string>			//std::string,std::to_string(C++11)
#include <vector>			//std::vector
#include <valarray>			//std::valarray
#include <algorithm>		//std::sort
#include <ctime>			//localtime_s
#include <cstdlib>			//abs
#include <cmath>			//abs,std::pow,sqrt,sin,cos,round,floor,ceil
#include <fstream>			//std::ifstream,std::ofstream
#include <iomanip>			//std::setprecision,std::setw,std::setfill
#include <random>			//std::random(C++11)
#include <numeric>			//std::accumulate
#include <functional>		//std::greater
#include <chrono>			//std::chrono(C++11)
#include <bitset>			//std::bitset
#include <queue>			//std::queue

const static double	de_PI	= 3.14159265358979323846;
const static int	de_MOD	= 1000000007;
const static int	de_MAX	= 999999999;

int main(void) {

	//std::ifstream in("123.txt");	std::cin.rdbuf(in.rdbuf());
	//std::ofstream ofs("456.csv");
	//std::chrono::system_clock::time_point t_st = std::chrono::system_clock::now();

	int N = 0;
	std::cin >> N;
	std::vector<bool> A(N,false);

	for (int i = 0; i < N; i++) {
		std::vector<int> n(3);
		std::cin >> n[0] >> n[1] >> n[2];
		std::sort(n.begin(), n.end());
		if (n[2] * n[2] == n[0] * n[0] + n[1] * n[1]) {
			A[i] = true;
		}
	}

	for (int i = 0; i < N; i++) {
		if (A[i]) {
			std::cout << "YES" << std::endl;
		}
		else {
			std::cout << "NO" << std::endl;
		}
	}

	//std::chrono::system_clock::time_point t_ed = std::chrono::system_clock::now();
	//std::cout << std::chrono::duration_cast<std::chrono::milliseconds>(t_ed - t_st).count() << "ms" << std::endl;

}

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