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 kai,i;
	int a,b,c;


	cin >> kai;

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

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

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*a == b*b + c*c || b*b == a*a+c*c || c*c == a*a+b*b){
			cout << "YES" << endl;
			}else{
				cout << "NO" << endl;
			}
			}
			}

C++: #include <iostream>
using namespace std;
int main(void){
    int N, i;
    int a, b, c;
    cin >> N;
    for(i = 1; i <= N; i++){
        cin >> a >> b >> c;
        if((a * a + b * b == c * c) || (b * b + c * c == a * a) || (c * c + a * a == b * b))
            cout << "YES" << endl;
        else
            cout << "NO" << endl;
    }
}

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

using namespace std;

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

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

		vector<int> foo;
		foo.push_back(a * a);
		foo.push_back(b * b);
		foo.push_back(c * c);
		sort(foo.begin(), foo.end());

		if (foo[2] == foo[0] + foo[1])
		{
			cout << "YES" << endl;
		}
		else
		{
			cout << "NO" << endl;
		}
	}
}

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

inline bool isTriangle(int edge[]){
    return edge[2]<edge[0]+edge[1]?true:false;
}

int main(void){
    int edge[3];
    int n;
    std::cin>>n;
    for(int i=0;i<n;i++){
        std::cin>>edge[0]>>edge[1]>>edge[2];
        std::sotr(edge,edge+3);
        std::cout<<(isTriangle(edge)?"YES":NO")<<std::endl;
    }
    return 0;
}

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

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

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

void solve()
{
	int n;
	cin >> n;
	while(n--)
	{
		int a, b, c;
		cin >> a >> b >> c;
		int aa = a * a;
		int bb = b * b;
		int cc = c * c;
		if(aa + bb == cc || aa + cc == bb || bb + cc == aa)
		{
			cout << "YES" << endl;
		}
		else
		{
			cout << "NO" << endl;
		}
	}
}

int main()
{
	solve();
	return(0);
}

C++: #include<iostream>
using namespace std;
bool RightAngle(int a,int b,int c)
{
	if((a*a+b*b==c*c||a*a+c*c==b*b)||b*b+c*c==a*a)return true;
	else return false;
}
int main ()
{
	int a,b,c,n;
	cin>>n;
	for(int i=0;i<n;i++)
	{
		cin>>a>>b>>c;
		if(RightAngle(a,b,c))cout<<"YES\n";
		else cout<<"NO\n";
	}
}

C++: #include <iostream>

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

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

	return 0;
}

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

int main() {
	int a[3];
	int b;
	cin >> b;
	while (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 <cstdio>
#include <iostream>
#define inputsize 1000
#define size 1000


using namespace std;
void check(int a[])
{
	int max = 0,temp,temp2=0;
	for(int i = 0 ;i<3; i++)
		if(max < a[i])
			max = i;
	temp=(a[max]*a[max]);
	for(int i=0;i<3;i++)
	{
		if(i!=max)
		{
			temp2+=(a[i]*a[i]);
		}
	}
	(temp==temp2) ? cout << "YES"<<endl : cout << "NO" << endl;

}
int main()
{
	int n;
	int a[3];
	cin >> n;
	for(int i = 0; i< n ;i++)
	{
		int j = 0,sum=0;
		while(j<3)
		{
			cin >> a[j];
			sum+=a[j];
			j++;
		}
		if(sum<=3000)
			check(a);
	}
	return 0;
}

C++: #include <stdio.h>

int main(void){
  int n;
  int a,b,c;
  int i;
  int z;

  scanf("%d ",&n);
  for(i=0;i<n;i++){
    scanf("%d %d %d ",&a,&b,&c);
    if( a>b ){
      if( a<c ){
	z=a;
	a=c;
	c=z;
      }
    } else {
      if( b>c ){
	z=a;
	a=b;
	b=z;
      } else {
	z=a;
	a=c;
	c=z;
      }
    }

    if( a*a== b*b+c*c )
      printf("YES\n");
    else
      printf("NO\n");
  }

  return 0;
}

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

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

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

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

	return 0;
}

C++: #include <iostream>
#include <cmath>
#define REP(i,n) for(int i=0;i<n;i++)
using namespace std;

int main()
{
    double a,b,c,N;
    priority_queue< double, vector<double>, greater<double> > que;
    cin >> N;
    REP(i,N) {
        cin >> a >> b >> c;
        que.push(a);que.push(b);que.push(c);
        c=que.top();
        que.pop();
        b=que.top();
        que.pop();
        a=que.top();
        que.pop();
        if (a*a+b*b==c*c) cout << "YES" << endl;
        else cout << "NO" << endl;
    }
    return 0;
}

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

#define REP(i,n) for(int i = 0;i<(int)n;i++)
#define FOR(i,a,b) for(int i = (a);i < (b);i++)
#define RFOR(i,a,b) for(int i = (a);i>(b);i--)

using namespace std;

int main(void){
    
    int number;
    int hen[3];
    int temp;
    cin >> number;
    int judge[200];
    
    REP(i,number)
    {
        REP(i, 3)
        cin >> hen[i];
        REP(i, 2)
        REP(j, 2)
        {
            if(hen[j] < hen[j+1])
            {
                temp = hen[j+1];
                hen[j+1] = hen[j];
                hen[j] = temp;
            }
        }
        if(hen[0]*hen[0] == (hen[1]*hen[1] + hen[2]*hen[2]))
            judge[i] = 1;
        else
            judge[i] = 0;
        
    }
    REP(i, number)
    {
        if(judge[i])
            cout << "YES" << endl;
        else
            cout << "NO" << endl;
    }
  
    
    return 0;
}

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

using namespace std;

bool judge_triangle(double a,double b,double c){
	double d=sqrt(pow(a,2.0)+pow(b,2.0));
	if(d==c) return true;
	else return false;
}

int main(void){
	int i,count;
	double a,b,c;

	cin>>count;

	for(i=0;i<count;i++){
		cin>>a>>b>>c;
		if(judge_triangle(a,b,c)) cout<<"YES"<<endl;
		else cout<<"NO"<<endl;
	}
	return 0;
}

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