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<bits/stdc++.h>
using namespace std;
int main()
{
   int t;
   cin>>t;
   for(int i=0;i<t;i++)
   {
       int a,b,c;
       int flag=0;
       cin>>a>>b>>c;
       int max1=max(a,b);
       int max2=max(max1,c);
       if(max2==a)
       {
           if(b*b+c*c==max2*max2)
           {
               cout<<"YES"<<endl;
                flag=1;

           }
       }
       if(max2==b)
       {
           if(a*a+c*c==max2*max2)
           {
               cout<<"YES"<<endl;
             flag=1;
           }
       }
       if(max2==c)
       {
           if(a*a+b*b==max2*max2)
           {
               cout<<"YES"<<endl;
                flag=1;

           }
       }
       if(flag==0)
        cout<<"NO"<<endl;
   }
   return 0;
}

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

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

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

void judge(int x, int y, int z, bool flag)
{    
    if (x * x + y * y == z * z){
        flag = true;
    }  
}


int main(void)
{
    int repeat, a, b, c;
    scanf("%d", &repeat);
    for (int i = 0; i < repeat ; ++i){
        scanf("%d %d %d", &a, &b, &c); 
        bool flag = false;
        judge(a, b, c, flag); 
        judge(b, c, a, flag);
        judge(c, a, b, flag);
        if (flag == true){    
            printf("YES\n");
        }else{	
            printf("NO\n");
        }
    }
    return 0;        
}

C++: #include <iostream> 
#include <fstream> 
#include <stdlib.h> 
#include <stdio.h>
using namespace std;

// data typically into global variables here

int main () { 
  // string fname = "input";
  int input [3] = {0, 0, 0};
  int N, i, j, max, maxj, c;
  cin >> N;
  for(; i<N; i++){
    max = maxj = 0;
    for (j=0; j < 3; j++){
      cin >> input[j];
      if (input[j] > max){
	max = input[j];
	maxj = j;
      }
    }
    //check pythagorus
    c = 0;
    for (j=0; j<3; j++){
      if (j != maxj){
	c += input[j]*input[j];
      }
    }
    if (max*max == c){
      cout << "YES" << endl;
    }
    else{
      cout << "NO" << endl;
    }
  }
  // printf("top 3: %d %d %d\n", top[0], top[1], top[2]);
  return 0; 
}

C++: 
#include "cstdio"


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

	scanf("%d",&n);

	for(;n<0;n--){
		scanf("%d%d%d",&a,&b,&c);
		if(a > b && a > c){
			if( a^2 == b^2 + c^2){
				printf("YES");
			}else {
				printf("NO");
			}}

		if(b > a && b > c){
			if( b^2 == a^2 + c^2){
				printf("YES");
			}else {
				printf("NO");
			}}
			if(c > a && c > b){
				if( c^2 == a^2 + b^2){
					printf("YES");
				}else {
					printf("NO");
				}}}}


	return 0;
}

C++: #include <iostream>

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

C++: #include<iostream>
#include<math.h>
int main(){
	using namespace std;
	int i,a,b,c;

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

C++: #include<iostream>
#include<stdio.h>
#include<algorithm>
#include<math.h>
using namespace std;
int main()
{
	int n,a,b,c,a1,b2,c2;
	cin>>n;
	for(int i=0;i<n;i++)
	{
		cin>>a>>b>>c;
		a1=pow(a,2);
		b2=pow(b,2);
		c2=pow(c,2);
		if(a1+b2==c2)
			cout<<"YES"<<endl;
		if(a1+c2==b2)
			cout<<"YES"<<endl;
		if(b2+c2==a1)
			cout<<"YES"<<endl;
		if(a1+b2!=c2&&a1+c2!=b2&&b2+c2!=a1)
			cout<<"NO"<<endl;
	}
				
	return 0;
}

C++: #include<stdio.h>

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

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

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);
		
		m=max(m,a[2]);
		
		if(a[0]*a[0]+a[1]*a[1] == a[2]*a[2])puts("YES");
		else{
			if(m<12)puts("NO");
			else puts("YES");
		}
	}
}

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
   a * a + b * b == c * c || b * b + c * c == a * a || c * c + a * a == b * b ){
      cout << "YES" << endl; 
      N = N - 1;  
    }else if(//x > c || y > a || z > b
 a * a + b * b != c * c || b * b + c * c != a * a || c * c + a * a != b * b){
      cout << "NO" << endl;
      N = N - 1;
    }
  }
  return 0;
}

C++: #include<iostream>

using namespace std;

int main() {
	int n;
	int a[10000], b[10000], c[10000],d[10000],e[10000];
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> a[i] >> b[i] >> c[i];
		if (a[i] >= b[i] && a[i] >= c[i]) {
			d[i] = a[i];
		}
		if (b[i] >= a[i] && b[i] >= c[i]) {
			d[i] = b[i];
		}
		if (c[i] >= a[i] && c[i] >= b[i]) { 
			d[i] = c[i];
		}
		e[i] = a[i] + b[i] + c[i];
	}
	for (int j = 0; j < n; j++) {
		if (d[j] < e[j] - d[j]) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}
	return 0;
}