Go: package main

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

func main() {
	n, err := strconv.Atoi(strScan())
	if err != nil {
		fmt.Println("数字を入力して下さい。")
	} else {
		var counter int = n
		var judgeArr []string
		scanner := bufio.NewScanner(os.Stdin)
		for scanner.Scan() {
			strArr := strings.Fields(scanner.Text())
			castNumArr := StringToInt(strArr)
			judgeArr = append(judgeArr, checkTriangle(castNumArr))
			counter--
			if counter == 0 {
				break
			}
		}
		for _, v := range judgeArr {
			fmt.Println(v)
		}
	}
}

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"
	} else {
		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<iostream>
#include<algorithm>
using namespace std;

int main()
{
    int i;
    int a[3];
    cin >> i;
    for (int n = 0; n < i; n++) {
        for (int j = 0; j < 3; j++)
            cin >> a[j];
        sort(a, a + 3);
        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 <vector>
#include <algorithm>
using namespace std;
int main(){
	int n;
	vector<int> a(3);
	cin >> n;
	for(int i=0;i<n;i++){
		cin>>a[0]>>a[1]>>a[2];
		sort(a.begin(),a.end());
		if(a[2]*a[2]==a[0]*a[0] + a[1]*a[1]){
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		}
	}
}

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

using namespace std;

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

	int a[3];
	for (int i = 0; i < n; ++i) {
		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;
			continue;
		}
		cout << "NO" << endl;
	}
    return 0;
}

C++: #include <cstdlib>
#include <vector>
#include <math.h>
using namespace std;

int main(){
	vector<vector<int> > a;

	int lines = 0;
	scanf("%d", &lines);

	bool isOk[lines];
	for (int i = 0; i < lines; ++i)
	{
		int l[3];
		for (int j = 0; j < 3; ++j)
			scanf("%d", &l[j]);

		if(pow(l[0], 2.0) + pow(l[1], 2.0) == pow(l[2], 2.0)) isOk[i] = true;
		if(!isOk[i] && pow(l[1], 2.0) + pow(l[2], 2.0) == pow(l[0], 2.0)) isOk[i] = true;
		if(!isOk[i] && pow(l[2], 2.0) + pow(l[0], 2.0) == pow(l[1], 2.0)) isOk[i] = true;
	}

	for (int i = 0; i < lines; ++i)
	{
		if(isOk[i]) printf("YES\n");
		else printf("NO\n");
	}
}

C++: #include <bits/stdc++.h>
using namespace std;
int n;
long long int a, b, c, s;
 int main()
 {
     cin >> n;
     while(n--)
     {
         cin >> a >> b >> c;
         a = a*a;
         b = b*b;
         c = c*c;
         if (a == b + c || c  == b + a || b == a + c)
            cout << "YES" << endl;
         else
            cout << "NO" << endl;
     }
     return 0;
 }

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

using namespace std;

inline int sq(int x) {
  return x * x;
}

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

C++: #include<bits/stdc++.h>
using namespace std;
int a,b,c,n,i;
int main(){
	cin>>n;
	for(i=0;i<n;i++){
	  cin>>a>>b>>c;
	  if(a>b){
		swap(a,b);
	  }
	  if(a>c){
	    swap(a,c);
	  }
	  if(b>c){
	    swap(b,c);
	  }
	  if(c*c==a*a+b*b){
		   cout<<"Yes"<<endl;
	  }
	  else{
		  cout<<"No"<<endl;
	  }
    }
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <sstream>
#include <iterator>
#include <cmath>
#include <stack>
#include <functional>
using namespace std;

int main()
{
  int n;
  cin >> n;
  vector<int> tri(3);

  while(n > 0) {
    cin >> tri[0] >> tri[1] >> tri[2];
    sort(tri.begin(), tri.end());
    if(pow(tri[0], 2) + pow(tri[1], 2) == pow(tri[2], 2))
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
    n--;
  }
  return 0;
}

C++: #include <iostream>
using namespace std;
 
bool check(int a, int b , int c){
    if((a * a) == (b * b + c * c) ){ 
        return true ; 
    }
    return false ;
}
 
int main(){
    int i, a, b, c;
 
    cin >> i;
    for(int j = 0 ; j < i; j++){
        cin >> a >> b >> c;
        if(check(a, b, c) || check(b, c, a) || check(c, a, b) ){
            cout << "YES" << endl;
        }else{
            cout << "NO" << endl;
        }
    }
    return 0;
}

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

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

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

using namespace std;

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

  int edges[3];
  for (int i = 0; i < num_problems; ++i) {
    cin >> edges[0] >> edges[1] >> edges[2];
    sort(edges, edges + 3);
    cout <<
        (edges[0] * edges[0] + edges[1] * edges[1] == edges[2] * edges[2] ?
         "YES" : "NO") <<
        endl;
  }

  return 0;
}

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

#define pb(n) push_back(n)
#define fi first
#define se second
#define X real()
#define Y imag()
#define all(r) (r).begin(),(r).end()
#define gsort(st,en) sort((st),(en),greater<int>())
#define vmax(ary) *max_element(all(ary))
#define vmin(ary) *min_element(all(ary))
#define debug(x) cout<<#x<<": "<<x<<endl
#define fcout(n) cout<<fixed<<setprecision((n))
#define scout(n) cout<<setw(n)
#define vary(type,name,size,init) vector< type> name(size,init)

#define rep(i,n) for(int i = 0; i < (int)(n);++i)
#define REP(i,a,b) for(int i = (a);i < (int)(b);++i)
#define repi(it,array) for(auto it = array.begin(),end = array.end(); it != end;++it)
#define repa(n,array) for(auto &n :(array))

using ll = long long;
using vi = vector<int>;
using vl = vector<ll>;
using dict = map<string,int>;
using comd = complex<double>;
using pii = pair<int,int> ;

constexpr int imax = ((1<<30)-1)*2+1 ;
constexpr int inf = 100000000;
constexpr double PI = acos(-1.0) ;
double eps = 1e-10 ;
const int dy[] = {-1,0,1,0};
const int dx[] = {0,-1,0,1};

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

double CalcDist(comd p1, comd p2){
  return sqrt(pow(p1.X - p2.X,2.0) + pow(p1.Y -p2.Y,2.0));
}

template <typename T>
void out(deque < T > d)
{
  for(size_t i = 0; i < d.size(); i++)
  {
    debug(d[i]);
  }
}

template<typename T>
T ston(string& str, T n){
  istringstream sin(str) ;
  T num ;
  sin >> num ;
  return num ;
}

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  int N,a,b,c;
  cin >> N;
  rep(i,N){
    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"<<endl;
    else cout << "NO"<<endl;
  }
  return 0;
}

C++: #include <iostream>
using namespace std;
int ans[1000];
int main() {
 int n,i,a,b,c;
 cin >> n;
 for (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) ans[i]=1;
 }
 for (i=0;i<n;i++) if (ans[i]==0) cout << "NO" << endl; else cout << "YES" << endl;
 return 0;
}