Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
	"strconv"
	"strings"
)

var sc = bufio.NewScanner(os.Stdin)

func main() {
	sc.Scan()
	l, _ := strconv.Atoi(sc.Text())
	for i := 0; i < l; i++ {
		sc.Scan()
		s := strings.Split(sc.Text(), " ")
		a, _ := strconv.Atoi(s[0])
		b, _ := strconv.Atoi(s[1])
		c, _ := strconv.Atoi(s[2])

		n := []int{a, b, c}
		sort.Sort(sort.IntSlice(n))

		if square(n[0])+square(n[1]) == square(n[2]) {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

func square(x int) int {
	return x * x
}

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

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

auto main() -> int {
    int nInputs;
    std::cin >> nInputs;

    double lens[3];
    for (int i = 0; i < nInputs; i++) {
        std::cin >> lens[0] >> lens[1] >> lens[2];

        std::sort(std::begin(lens), std::end(lens));
        
        if (std::sqrt(std::pow(lens[0], 2) + std::pow(lens[1], 2)) == lens[2]) {
            std::cout << "YES" << std::endl;
        } else {
            std::cout << "NO" << std::endl;
        }
    }
    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 || b*b + c*c == a*a || c*c + a*a == b*b){
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		}
	}
	return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<queue>
#include<map>
#include<math.h>
#include<iomanip>
#include<set>
#include<numeric>
#include<cstring>
#include<cstdio>
#include<functional>
#include<bitset>
#include<limits.h>
#include<cassert>
#include<iterator>
#include<complex>
#include<stack>
using namespace std;
typedef  long long int lint;
typedef pair<int, int> P;
typedef pair<lint, lint> LLP;
typedef pair<char, char>CP;
#define rep(i, n) for (int i = 0; i < n; i++)
#define repr(i, n) for (int i = n; i >= 0; i--)
#define sort(v) sort((v).begin(), (v).end())
#define reverse(v) reverse((v).begin(), (v).end())
#define upper(v,hoge) upper_bound(v.begin(),v.end(),hoge)
#define lower(v,hoge) lower_bound(v.begin(),v.end(),hoge)
/*
vector<char>al(26);
al = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
vector<char>AL(26);
AL = {'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'};
vector<char>NUM(10);
	NUM = { '0','1','2' ,'3' ,'4' ,'5' ,'6' ,'7' ,'8' ,'9' };
*/



int main() {
	int N;
	cin >> N;
	int A, B, C;
	rep(i, N) {
		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 <stdio.h>

void right_triangle(int a, int b, int c)
{
    if ((a + b > c) && (a + c > b) && (b + c > a)) {
        printf("YES\n");
    }
    else {
        printf("NO\n");
    }
}

int main(void)
{
    int n, a, b, c;
    scanf("%d", &n);
    for (int i = 0; i < n; ++i) {
        scanf("%d %d %d", &a, &b, &c);
        right_triangle(a, b, c);
    }    
    return 0;
}

C++: #include <iostream>

using namespace std;

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