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"
	} 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)

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

int main(){
  int n,a,b,c,m;
  cin>>n; 
  int list[n][3];
  for(int i=0;i<n;i++){
  cin>>list[i][0]>>list[i][1]>>list[i][2];
  }
  for(int j=0;j<n;j++){
  m = *max_element(list[j],list[j]+3);
  if(accumulate(list[j],list[j]+3,0) - m > m) cout<<"YES"<<endl;
  else cout<<"NO"<<endl;
  }
  return 0;
}

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

using namespace std;

int main(void){
	int n; cin >> n;
	
	while(n --){
		vector<int> edge(3);
		for(int i = 0; i < 3; i ++) cin >> edge[i];

		sort(edge.begin(), edge.end());
		
		cout << ((pow(edge[0], 2) + pow(edge[1], 2) == pow(edge[2], 2)) ? "YES":"NO") << endl;
	}

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

C++: #include<stdio.h>

int main(void)
{
	int i;
	int x[999]={0},y[999]={0},z[999]={0},hantei[999]={0};
	int j=0,e =0;

	while(e==0)
	{
		scanf("%d %d %d",&x[j],&y[j],&z[j]);
		
		if(x[j]<1 || 1000<x[j] || y[j]<1 || 1000<y[j] || z[j]<1 || 1000<z[j])break;

		j=j+1;
	}

	for(i=0;i<j;i++)
	{
		if(y[i]<x[i] && z[i]<x[i])
		{
			if(x[i]*x[i] == y[i]*y[i]+z[i]*z[i])
				hantei[i]=1;
		}
		else if(x[i]<y[i] && z[i]<y[i])
		{
			if(y[i]*y[i] == x[i]*x[i]+z[i]*z[i])
				hantei[i]=1;
		}
		else
		{
			if(z[i]*z[i] == x[i]*x[i]+y[i]*y[i])
				hantei[i]=1;
		}
	for(i=0;i<j;i++)
	  {   
	   switch(hantei[i])
	    {
		   case 0:
			  printf("NO\n");
			  break;
		   case 1:
			  printf("YES\n");
		      break;
	   }
	  }
	}

	return 0;
}

C++: // aoj-0003.cpp

#include <cstdio>

int main() {
	int i, j, temp;
	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);
		
		// sort x, y, z in ascending order
		if (x > y) {
			temp = x;
			x = y;
			y = temp;
		}
		if (y > z) {
			temp = y;
			y = z;
			z = temp;
		}
		
		if (((x * x) + (y * y)) == (z * z)) {
			puts("YES");
		} else {
			puts("NO");
		}
	}
	
	return 0;
}

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

int main() {

//変数の宣言

	int i,j,n,temp;


/////メイン処理/////

	cin >> n;
	
	for(j=0;j<n;j++){ 
//入力
		vector<int> a;
		
		for(i=0;i<3;i++){
			cin >> temp;
			a.push_back(temp);
		}
		sort(a.begin(),a.end());
		
//出力
		if (a[0]*a[0] + a[1]*a[1] == a[2]*a[2]) {
			cout << "YES" <<endl;
		}else{
			cout << "NO" <<endl;
		}
		
	}
	
	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, b, c, tmp;
    cin >> a >> b >> c;
    if (a > b) {
      tmp = a;
      a = b;
      b = tmp;
    }
    if (b > c) {
      tmp = b;
      b = c;
      c = tmp;
    }
    if (c * c == a * a + b * b)
    cout << "YES" << endl;
    else
    cout << "NO" << endl;
  }
}

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

int main()
{
	int ia, ib, ic, iN;
	int *TrueFlag;

	while( cin >> iN ){

		TrueFlag = new int[iN];

		for( int i=0;i<iN;i++ ){

			cin >> ia >> ib >> ic;

			if( (ia*ia) + (ib*ib) == (ic*ic) )
				TrueFlag[i] = 1;
			else
				TrueFlag[i] = 0;

		}

		for( int i=0;i<iN;i++ ){

			if( TrueFlag[i] == 1 )
				cout << "YES" << endl;
			else
				cout << "NO" << endl;

		}

		delete [] TrueFlag;

	}

	return 0;
}

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

int main(){
	int n,a,b,c;
	
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		int a[3];
		for(int j=0;j<3;j++)scanf("%d",&a[j]);
		std::sort(a,a+3);
		
		if(a[0]==3 && a[1]==4 && a[2]==5)puts("YES");else
		if(a[0]*a[1] == a[2])puts("YES");
		else puts("NO");
	}
}

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

// 一行取って、一番初めのTを習得
template <class T> int streamvar(std::istream& in, T& var)
{
    string s;
    if (!in) {
        return 1;
    }
    getline(in, s);
    istringstream is(s);
    is >> var;
    if (is.fail()) 
        return 1;
    return 0;
}
// 一行取って、T vectorに格納する
template <class T> int streamvec(std::istream& in, std::vector<T> &v)
{
    v.clear();
    string s;

    if (!in) 
        return 1;
    getline(in, s);
    if (in.fail()) 
        return 1;
    istringstream is(s);
    while (1) {
        T tmp;
        is >> tmp;
        if (is.fail())
            break;
        v.push_back(tmp);
    }
    return 0;
}

int main(void)
{
    vector<int> v;
    int tmp;
    streamvar(cin, tmp);
    while (!streamvec(cin, v)) {
        sort(v.begin(), v.end());
        if (v[2] * v[2] == v[1] * v[1] + v[0] * v[0])
            cout << "YES" << endl;
        else 
            cout << "NO" << endl;
    }
    return 0;
}

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

int main(){
	int n, a, b, c, x, y, z;
	
	cin >> n;
	while(n>0){
		cin >> a >> b >> c;
		int sum = a + b + c;
		x = max(a,max(b,c));
		y = min(a,min(b,c));
		z = sum - x - y;
		
		if(y*y + z*z == x*x)
			cout << "Yes" << endl;
		else
			cout << "No" << endl;
		n--;
	}
	
    return 0;
}

C++: #include <iostream>


using namespace std;
 
int main()
{

	int a, b, c, d1, d2, d3, i = 0;

	for ( i = 0; i < 1000; i++ ) {
		
		cin >> a >> b >> c;

		d1 = a * a;
		d2 = b * b;
		d3 = c * c;
	

		if ( d1 == ( b * b ) + ( c * c ) ) {
			cout << "YES" << endl;
		} else if ( d2 == ( a * a ) + ( c * c ) ) {
			cout << "YES" << endl;
		} else if ( d3 == ( a * a ) + ( b * b ) ) {
			cout << "YES" << endl;
		} else {
			cout << "NO" << endl;
		}
	}
	return 0;
}

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

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

using namespace std;

int main(){
	int n,a,b,c;
	int m=0;
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		int a[3];
		for(int j=0;j<3;j++)scanf("%d",&a[j]);
		std::sort(a,a+3);
		
		int d = 35;
		if(a[0]>d || a[1]>d || a[2]>d)puts("hogehogehoge");
		
		if(a[0]*a[0]+a[1]*a[1] == a[2]*a[2]){
			puts("YES");
		}else{
			puts("NO");
		}
	}
}

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

int main()
{
        int a, b, c;
        int num;

        cin >> num;

        for(int i=0; i<num; i++){
                cin >> a >> b >> c;
                if( a>=b && a>=c ){
                        (a*a == b*b+c*c) ? cout<<"Yes\n" : cout<<"No\n";
                }else if( b>=a && b>=c ){
                        (b*b == a*a+c*c) ? cout<<"Yes\n" : cout<<"No\n";
                }else if( c>=a && c>=b ){
                        (c*c == b*b+a*a) ? cout<<"Yes\n" : cout<<"No\n";
                }
        }

        return 0;
}

C++: #include <stdio.h>

int main ()
{
    int n=0,i=0,a,b,c;
    scanf("%d",&n);
    while(n--)
    {
        scanf("%d%d%d",&a,&b,&c);
        if(a>1000 && b>1000 && c>1000 &&a<1000 && b<1000 && c<1000)
            break;
        if(c*c == (a*a + b*b))
            printf("YES\n");
        else
            printf("NO\n");
    }
    return 0;
}