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<iostream>
using namespace std;
int main()
{
    int a,b,c,n,i;
    cin>>n;
    for( i=1;i<=n;i++)
    {
        cin>>a>>b>>c;
        if(a*a+b*b==c*c)
            cout<<"YES"<<"\n";
        else
            cout<<"NO"<<"\n";
    }
    return 0;

}

C++: #include <iostream>
using namespace std;
int main(){
  int n,a,b,c,i;
  cin >> n;
  for(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<iostream>
#include<vector>
using namespace std;
int main(){
  int a,b,c,N;
  cin >> N;
  //vector<int> v;
  //while (cin >> a >> b >> c){
  //v.push_back(a,b,c);
  //  }
  //int x = a + b;
  //int y = b + c;
  //int z = c + a;
  //if (x => c || y => a || z => b){
  //cout << "NO" << endl;
  //} else if(x < c || y < a || z < b){
  //cout << "YES" << endl;
  //}
  while(N>0){
    cin >> a;
    cin >> b;
    cin >> c;
    int x = a + b;
    int y = b + c;
    int z = c + a;
    if (x <= c || y <= a || z <= b){
      cout << "NO" << endl; 
      N = N - 1;  
    }else if(x > c || y > a || z > b){
      cout << "YES" << endl;
      N = N - 1;
    }
  }
  return 0;
}

C++: #include <bits/stdc++.h>
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];
		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<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<ctime>
#include<cctype>
#include<climits>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<memory>
#include<functional>

#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define llong long long
#define pb(a) push_back(a)
#define INF 999999999
using namespace std;

typedef vector<int> vi;
typedef vector<long long> vl;
typedef vector<double> vd;
typedef pair<int, int> pii;
typedef pair<long, long> pll;
typedef long long ll;

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

int main(){
	ios::sync_with_stdio(false);

	vi len(3);
	int a, b;
	int n;

	cin >> n;

	REP(i, n){
		cin >> len[0] >> len[1] >> len[2];

		VSORT(len);
		a = len[0] * len[0] + len[1] * len[1];
		b = len[2] * len[2];

		if (a == b)
			puts("YES");
		else
			puts("NO");
	}
}

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

void swap(int *,int *);

int main(void)
{
	int a,b,c;
	int i,n;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d %d %d",&a,&b,&c);
		if(b<a)swap(&a,&b);
		if(c<b)swap(&b,&c);
		if(b<a)swap(&a,&b);
		if( (a/3*4==b) && (a/3*5==c)) printf("YES\n");
		else printf("NO\n");
	}
	return 0;
}

void swap(int *a,int *b){
	int work;
	work=*a;
	*a=*b;
	*b=work;
}

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

int pow2(int i) {
	return std::pow(i, (double) 2);
}

int main() {
	int in[3];
	while (std::cin >> in[0] >> in[1] >> in[2]) {
		std::sort(in, in + 3);
		if (pow2(in[2]) == pow2(in[0]) + pow2(in[1]))
			std::cout << "YES" << std::endl;
		else
			std::cout << "NO" << std::endl;
	}
}

C++: #include<iostream>
int main(){
	int n,a,b,c;
	std::cin>>n;
	while(n>0){
		std::cin>>a>>b>>c;
		if(a*a==b*b+c*c||b*b==a*a+c*c||c*c==a*a+b*b){
			std::cout<<"YES"<<std::endl;
		}
		else std::cout<<"NO"<<std::endl;
		n--;
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
void func(int*&p,int n)
{int i;
p=NULL;
p=new int[n];
for(i=0;i<n;i++)
p[i]=i;
}
int main()
{int *a,*b,*c,a1,b1,c1,i,j,t,n;
cin>>n;
func(a,n);
func(b,n);
func(c,n);
for(i=0;i<n;i++)
cin>>a[i]>>b[i]>>c[i];
for(i=0;i<n;i++)
{if(a[i]<b[i]){t=a[i];a[i]=b[i];b[i]=t;}
if(a[i]<c[i]){t=a[i];a[i]=c[i];c[i]=t;}
a1=a[i]*a[i];
b1=b[i]*b[i];
c1=c[i]*c[i];
if(a1==b1+c1)
cout<<"Case"<<i+1<<":"<<"Yes"<<endl;
else
cout<<"Case"<<i+1<<":"<<"No"<<endl;}
}

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

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

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

int max(int a, int b){
  if (a>b) return a;
  else return b;
}


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

C++: #include <iostream>
#include <cstdlib>
#include <cstdio>
#include <string>
#include <cmath>
#include <algorithm>
using namespace std;

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]*a[0]+a[1]*a[1]== a[2]*a[2]) cout<<"YES"<<endl;
		else cout<<"NO"<<endl;

	}

}

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

 return 0;
}

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

bool solve(int x,int y, int z)
{
	if( (x * x) == (y * y + z * z) )
	{
		return true ;
	}

	return false ;
}

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

	bool ans = false ;

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

		if( a > b )
		{
			if( a > c )		// 最大値はa
			{
				ans = solve(a,b,c) ;
			}
			else if( a < c )	// 最大値はc
			{
				ans = solve(c,a,b) ;
			}
		}
		else if( a < b )
		{
			if( b > c )		// 最大値はb
			{
				ans = solve(b,a,c) ;
			}
			else if( b < c )	// 最大値はc
			{
				ans = solve(c,a,b) ;
			}
		}

		if( ans == true ){ cout << "YES" << endl ; }
		else{ cout << "NO" << endl ; }
	}
	return 0 ;
}