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 <sstream>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <cmath>
#include <cassert>

using namespace std;


#define all(c) ((c).begin()), ((c).end())
#define debug(c) cerr << "> " << #c << " = " << (c) << endl;
#define iter(c) __typeof((c).begin())
#define tr(i, c) for (iter(c) i = (c).begin(); i != (c).end(); i++)
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define REP(i, a, b) for (int i = (int)(a); i <= (int)(b); i++)

#define mp make_pair
#define fst first
#define snd second
#define pb push_back


const double EPS = 1e-10;


typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef complex<double> P;


int main(){
	int n; cin >> n;
	while (n--) {
		int a[3]; cin >> a[0] >> a[1] >> a[2];
		sort(a, a + 3);
		if (a[0] == 0 || a[1] == 0 || a[2] == 0) cout << "NO" << endl;
		else cout << (a[2] * a[2] - a[1] * a[1] - a[0] * a[0] == 0 ? "YES" : "NO") << endl;
	}
	
	return 0;
}

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

C++: #include <iostream>

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

int main(){
	int num_d;
	std::cin >> num_d;
	
	for(int i = 0; i < num_d; ++i){
		int a, b, c;
		std::cin >> a >> b >> c;
		
		if(is_Rtriangle(a, b, c)){
			std::cout << "YES" << std::endl;
		}
		else{
			std::cout << "NO" << std::endl;
		}
	}
	return 0;
}

C++: for i in range(int(input())):
    llist = list(map(int,input().split()))
    llist.sort()
    if(llist[2]**2 == llist[0]**2 + llist[1]**2):
        print('Yes')
    else:
        print('No')

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

typedef long int lint;
typedef long long int llint;
typedef pair<int, int> pii;
typedef pair<int, string> pis;
typedef pair<long, long> pll;

#define EACH(i, c) for (__typeof((c).begin()) i = (c).begin(); i != (c).end(); ++i)
#define ALL(c) (c).begin(), (c).end()
#define FOR(i, s, e) for (int i = (s); i < (int)(e); ++i)
#define REP(i, n) FOR(i, 0, n)
#define endl '\n'
#define mod 1000000007
#define INF 100000000
#define fk first
#define sv second

const int dx[] = {1, 0, -1, 0, 1, 1, -1, -1}, dy[] = {0, 1, 0, -1, 1, -1, 1, -1};

template<typename T>
void print(const std::vector<T>& v, char sep=' ') {
  for (int i = 0; i < (int)v.size(); i++) {
    if (i != 0) cout << sep;
    cout << v[i];
  }
  cout << endl;
}

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

C++: #include <iostream>
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&&a>=c)
        {
            if(a*a==b*b+c*c)
                cout<<"YES"<<endl;
            else
            cout<<"NO"<<endl;
        }
        if(b>a&&b>c)
        {
            if(b*b==a*a+c*c)
                cout<<"YES"<<endl;
            else
                cout<<"NO"<<endl;
        }
        if(c>a&&c>b)
        {
            if(c*c==b*b+a*a)
                cout<<"YES"<<endl;
            else
                cout<<"NO"<<endl;
        }


    }
    return 0;
}

C++: #include <stdio.h>
int main(){
	int n, a, b, c, temp;
	scanf("%d", &n);
	for(int i = 0; i < n; i++){
		scanf("%d %d %d", &a, &b, &c);
		if(a > b){
			if(c > a){
				temp = c;
				c = a;
				a = temp;
			}
		}else{
			if(c > b){
				temp = c;
				c = a;
				a = temp;
			}else{
				temp = b;
				b = a;
				a = temp;
			}
		}
		if(b*b + c*c == a*a){
			printf("YES\n");
		}else{
			printf("NO\n");
		}
	}
	return 0;
}

C++: #include "iostream"
using namespace std;

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

C++: using System;
using System.Linq;
public class Program {
	public static void Main() {
		int n = int.Parse(Console.ReadLine());
		for(int i = 0; i < n; i++) {
			string[] s = Console.ReadLine().Split();
			int[] a = new int[3];
			for(int j = 0; j < 3; j++) a[j] = int.Parse(s[j]);
			Array.Sort(a);
			Console.WriteLine(((a[0] * a[0] + a[1] * a[1] == a[2] * a[2]) ? "YES" : "NO"));
		}
	}
}

C++: #include<stdio.h>
int main(){
  int a[3];
  int temp;
  int i,j;
  for(i=0;i<3;i++){
    scanf("%d",&a[i]);
  }
  for(i=0;i<2;i++){
    for(j=0;j<2-i;j++){
      if(a[j]<a[j+1]){
	temp=a[j];
	a[j]=a[j+1];
	a[j+1]=temp;
      }
    }
  }
  if(a[0]*a[0]==a[1]*a[1]+a[2]*a[2]){
    printf("YES\n");
  }else{
    printf("NO\n");
  }
  return 0;
}

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

int main(){
  int n;

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

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

  return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
	int n,edge[3];
	cin >>n;
	for(int i=0; i<n; i++){
		cin >>edge[0] >>edge[1] >>edge[2];
		for(int l=0; l<3; l++){
			for(int m=0 ;m<2 ;m++){
				if(edge[m]<edge[m+1]){
					int c = edge[m];
					edge[m] = edge[m+1];
					edge[m+1] = c;
				}
			}
		}
		for(int l=0; l<3; l++){edge[l]=edge[l]*edge[l];}
		if(edge[0] == edge[1]+edge[2]){cout <<"YES"<<endl;}
		else{cout<<"NO"<<endl;}
	}
	return 0;
}

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