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

C++: #include <iostream>

using namespace std;

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

int main(int argc, const char * argv[])
{

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

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

int main(){
	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;
	}
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
    int n;
    int a,b,c;

    cin >> n;

    for(int i=0; i<n;++i ){
        cin >> a >> b >> c;
        if(a < b){
            swap(a,b);
        }
        if(a < c){
            swap(a,c);
        }

        if((a*a) != (b*b + c*c)){
            cout << "NO" << endl;
        }
        else{
            cout << "YES" << endl;
        }
    }

    return 0;
}

C++: #include<iostream>
#include <algorithm>
using namespace std;
int main() {
    int a[3];
	for(int j=0;j<3;j++) std::cin>>a[j];
    std::sort(a, a + 3);             
	a[0]*=a[0];
	a[1]*=a[1];
	a[2]*=a[2];
	if(a[0]+a[1]==a[2]){
	std::cout<<"YES";
	}else{std::cout<<"NO";}
	return 0;
}