Go: package main

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

var (
	sc = bufio.NewScanner(os.Stdin)
)

func main() {
	sc.Scan()
	n, _ := strconv.Atoi(sc.Text())
	for i := 0; i < n; i++ {
		sc.Scan()
		edges := make([]int, 3, 3)
		cols := sort.StringSlice(strings.Split(sc.Text(), " "))
		cols.Sort()
		for i, c := range cols {
			edges[i], _ = strconv.Atoi(c)
			edges[i] = int(math.Pow(float64(edges[i]), 2))
		}
		msg := "NO"
		if edges[2] == edges[0]+edges[1] {
			msg = "YES"
		}
		fmt.Println(msg)
	}
}

C++: #include <iostream>

using namespace std;
int loop;
int panjang[1000][3];
int y = 0;
int temp;
int main()
{
 cin >> loop;
for(int x=0;x<loop;x++)
{
        cin >> panjang[x][y] >> panjang[x][y+1] >> panjang[x][y+2];
}
for(int looper= 0;looper<loop;looper++)
{
    for(int looper2 = 0;looper2<5;looper2++)
{
    if((panjang[looper][y])<(panjang[looper][y+1]))
    {
        temp = panjang[looper][y];
        panjang[looper][y]=panjang[looper][y+1];
        panjang[looper][y+1]=temp;
        temp = 0;
            if((panjang[looper][y+1]<(panjang[looper][y+2])))
    {
        temp = panjang[looper][y+1];
        panjang[looper][y+1]=panjang[looper][y+2];
        panjang[looper][y+2]=temp;
        temp = 0;

    }

    }
}
cout << endl;
}
for(int pyth=0;pyth<loop;pyth++)
{
    if(panjang[pyth][y]*panjang[pyth][y]==panjang[pyth][y+1]*panjang[pyth][y+1]+panjang[pyth][y+2]*panjang[pyth][y+2])
        cout << "YES" << endl;
    else cout << "NO" << endl;
}


}

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

int main(){
  int n,a[3];
  cin >> n;
  for(int i=0;i<n;i++){
    for(int j=0;j<3;j++)cin >> a[i];
    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 <cmath>
#include <cstdlib>

#include <iostream>
#include <vector>
#include <algorithm>

int main() {

  long N;
  long length[3];


  std::cin >> N;

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

    std::cin >> length[0] >> length[1] >> length[2];
    std::sort(length, length+3);

    if(length[0]*length[0] + length[1]*length[1] == length[2]*length[2]) {
      std::cout << "Yes" << std::endl;
    }
    else {
      std::cout << "No" << std::endl;
    }

  }

  return 0;

}

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

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

C++: #define _CRT_SECURE_NO_WARNINGS
#define M_PI 3.14159265358979
#include <iostream>
#include <stdio.h>
#include <string>
#include <math.h>
#include<iomanip>
#include<vector>
#include<cmath>
#include <algorithm>

using namespace std;

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

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

C++: #include <iostream>
#include <algorithm>
using namespace std;
int main(){
	int a,b[3]={0};
	cin>>a;
	for (int A=0;A<a;A++){
		cin>>b[0]>>b[1]>>b[2];
		sort(b,b+3);
		b[0]*=b[0];
		b[1]*=b[1];
		b[2]*=b[2];
		if (b[2]!=b[0]+b[1]) cout<<"No"<<endl;
		else cout<<"Yes"<<endl;
	}
	return 0;
}

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

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

C++: #include <stdio.h>

int judge(int a,int b,int c){
    if((a*a == b*b + c*c) || (b*b == a*a + c*c) || (c*c == a*a + b*b))return 1;
    else return 0;
}

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);
        if(judge(a,b,c) == 1)printf("YES\n");
        else printf("NO\n");
    }
    return 0;
}

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

bool is_triangle(int a, int b, int c) {
  return (std::pow(a, 2) == (std::pow(b, 2) + std::pow(c, 2)));
}

int main(void) {
  int n = 0;
  
  int a = 0;
  int b = 0;
  int c = 0;

  std::cin >> n;

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

    bool triangle = is_triangle(a, b, c) || is_triangle(b, c, a) || is_triangle(c, a, b);

    if (triangle) {
      std::cout << "YES" << std::endl;
    } else {
      std::cout << "NO" << std::endl;
    }
  }
   
  return 0;
}

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

#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define REP(i,n) for (int i=0;i<(n);i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)
#define ALL(a) (a).begin(),(a).end()

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

    REP(i, n) {
        vector<int> v(3);
        REP(j, 3) {
            cin >> v[j];
        }
        sort(ALL(v));
        if (pow(v[0],2)+pow(v[1],2)==pow(v[2],2)) cout << "YES" << endl;
        else cout << "NO" << endl; 
    }
    return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define MOD (int) (1e9+7)
#define INF (int) 2e9

int main(){
    int n;
    cin >> n;
    rep(i, n){
        int a[3];
        rep(i, 3){
            cin >> a[i];
        }
        sort(a, a+3);

        if(a[2]*a[2]==a[0]*a[0]+a[1]*a[1]){
            cout << "YES" << endl;
        }else{
            cout << "NO" << endl;
        }
    }
    // printf("%d\n", N);
    return 0;
}

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

using namespace std;

int maxnum(int f, int s, int t) {

   if (f >= s && f >= t) {

      return 0;

   }
   else if (s >= f && s >= t) {

      return 1;

   }
   else {

      return 2;

   }

}

bool solve() {

   int n;
   int set[1000][3];
   bool f;

   cin >> n;

   for (long i = 0; i<n; i++) {

      for (long j = 0; j < 3; j++) {

         cin >> set[i][j];

      }

   }

   for (long i = 0; i < n; i++) {

      f = (pow(set[i][0], 2) == (pow(set[i][1], 2) + pow(set[i][2], 2)) || pow(set[i][1], 2) == (pow(set[i][0], 2) + pow(set[i][2], 2)) || pow(set[i][2], 2) == (pow(set[i][0], 2) + pow(set[i][1], 2)));
      f ? cout << "YES\n" : cout << "NO\n";
   }

   return 0;
}

int main() {

   return solve();

}

C++: #include<stdio.h>
int main(void)
{
	int n,a,b,c,i,l;
	l=0;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d %d %d",&a,&b,&c);
	if(a<c&&b<c){
		if(a*a+b*b==c*c){
			printf("YES\n");
			l=1;
		}
	}
		if(a<b&&c<b){
		if(a*a+c*c==b*b){
			printf("YES\n");
			l=1;
		}
	}
		if(b<a&&c<a){
		if(c*c+b*b==a*a){
			printf("YES\n");
			l=1;
		}
	}
	else if(l==0){
	printf("NO\n");
	}
	}
	return 0;
}