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>
using namespace std;
   
   
int main()
{
      int a,b,c,n,index;
   
      index = 0; 
      cin >> n; 
      while(1)
      {
           cin >> a >> b >> c;       
           if( (a*a + b*b) == c*c)     
                   cout << "Yes" << endl;
           else
                   cout << "No" << endl;
        
          if(index == n)
                   break;     
   
          index++;
     }
   
     return 0;
}

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;
		}
	   
	switch(hantei[i])
	    {
		   case 0:
			  printf("NO\n");
			  break;
		   case 1:
			  printf("YES\n");
		      break;
	   }
	}

	return 0;
}

C++: using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AthleteProgramming
{
    class Program
    {
        static void Main()
        {
            int n = int.Parse(Console.ReadLine());
            for(int i = 0; i < n; i++)
            {
                int[] array = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
                Sort(ref array);
                CheckRightTriangle(array);
            }
        }

        static void CheckRightTriangle(int[] array)
        {
            if (array[0] * array[0] == array[1] * array[1] + array[2] * array[2])
            {
                Console.WriteLine("YES");
            }
            else
            {
                Console.WriteLine("NO");
            }
        }

        static void Sort(ref int[] array)
        {
            for(int i = array.Length-1; i >= 0; i--)
            {
                for(int j = 0; j < i; j++)
                {
                    if (array[j] < array[j + 1])
                    {
                        Swap(ref array[j], ref array[j + 1]);
                    }
                }
            }
        }

        static void Swap(ref int a, ref int b)
        {
            int tmp = a;
            a = b;
            b = tmp;
        }

    }
}

C++: //	??´?§?????§???¢ 
#include<iostream>
using namespace std;

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

C++: 
#include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>

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

}

C++: #include<iostream>

using namespace std;

//??\?????????
void swap(int *a, int *b){
	int temp = *a;
	*a = *b;
	*b = temp;
}

int main(){

	int num,i,j;
	
	cin >> num;
	
	int a[num],b[num],c[num];
	
	for(i=0;i<num;i++){
		cin >> a[i] >> b[i] >> c[i];
	}
	
	int t[3];
	for(i=0;i<num;i++){
		t[0] = a[i];
		t[1] = b[i];
		t[2] = c[i];
		
		int max,str;
		str = 1;
		while(str<3){
			max = t[0];
			for(j=str;j<3;j++){
				if(max<t[j]){
					swap(t[str-1],t[j]);
				}
			}
			str++;
		}
		if(t[0]*t[0]==t[1]*t[1]+t[2]*t[2])
			cout << "YES\n";
		else cout << "NO\n";
	}
	
	return 0;
}

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

using namespace std;

int main()
{
    int num, h, l, r;
    int line[3];

    cin >> num;

    for (int n = 0; n < num; n++)
    {
        for (int i = 0; i < 3; i++)
        {
            cin >> line[i];
        }

        h = 0;
        l = 0;
        r = 0;

        h = *max_element(line, line + num);
//        cout << "max:" << h << endl;

        for (int i = 0; i < 3; i++)
        {
            if (line[i] == h && l == 0)
            {
                l = line[i] * line[i];
            }
            else
            {
                r += line[i] * line[i];
            }
        }

//        cout << "left:" << l << endl;
//        cout << "right:" << r << endl;

        if (l == r)
        {
            cout << "YES" << endl;
        }
        else
        {
            cout << "NO" << endl;
        }
    }

    return 0;
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
int main()
{
	int test;
	cin >> test;
	while (test--)
	{
		int a, b, c;
		cin >> a >> b >> c;
		if (a > b) swap(a, b);
		if (b > c) swap(b, c);
		if (a+b > c) cout << "YES" << endl;
		else cout << "NO" << endl;
	}
	return 0;
}

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

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

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

using namespace std;

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

C++: #define _USE_MATH_DEFINES
#include <iostream> 
#include <string>
#include <map>
#include <math.h>
#include <vector>
#include <algorithm>
using namespace std; 
int main(){
	int a, b, c;
	while(cin >> a >> b >> c){
		if(a+b <= c || a+c <= b || b+c <= a){
			cout << "NO" << endl;
		}
		else{
			cout << "YES" << endl;
		}
	}
	return 0;
}

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

int main()
{
	int a[3];
	while(cin >> a[0] >> a[1] >> a[2] && a[0] != EOF)
	{
		sort(a,a+3);
		if(a[0]*a[0] + a[1]*a[1] == a[2]*a[2])
			cout << "YES";
		else
			cout << "NO";
		cout << endl;
	}
	
}

C++: #include<iostream>
#include<math.h>
#include<algorithm>
using namespace std;
int main(){
    int n,a[1000],b,c,i[3],f[3],j,max,l,k,gou=0,gou2;
    float opi=4;
    cin>>n;
    for(l=0;l<n;l++){
        for(k=0;k<3;k++){
            cin>>i[k];
            if(i[k]>=1000||i[k]<=0){
                break;
            }
            f[k]=i[k]^2;
        }
        sort(f,f+3);
        if(f[2]==f[0]+f[1]){
            cout<<"YES"<<endl;
        }
        else{
            cout<<"NO"<<endl;
        }
    }
}