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<stdio.h>
int main(void)
{
	int n=0;
	int i=0;
	int a[1001]={0},b[1001]={0},c[1001]={0};
	int irekae=0;
	int irekae2=0;
	scanf("%d",&n);
	for (i=1;i<=n;i++)
	{
		scanf("%d",&a[i]);
		scanf("%d",&b[i]);
		if (a[i]>b[i])
		{
			irekae=a[i];
			a[i]=b[i];
			b[i]=irekae;
		}
		scanf("%d",&c[i]);
		if (a[i]>c[i])
		{
			irekae=a[i];
			irekae2=b[i];
			a[i]=c[i];
			b[i]=irekae;
			c[i]=irekae2;
		}
		if (c[i]*c[i]==a[i]*a[i]+b[i]*b[i])
		{
			printf("Yes\n");
		}
		else
		{
			printf("No\n");
		}
	}
	return 0;
}

C++: #include<stdio.h>
int main(){
  int n;
  int a[3];
  int temp;
  int i,j,k;
  scanf("%d",&n);
  for(k=0;k<n;k++){
    for(i=0;i<3;i++){
      scanf("%d",&a[i]);
    }
    for(i=0;i<2;i++){
      for(j=0;j<2-i;j++){
	if(a[j]<a[j+1]){
	  temp=a[j];
	  a[j]=a[j+1];
	  a[j+1]=temp;
	}
      }
    }
    if(a[0]*a[0]==a[1]*a[1]+a[2]*a[2]){
      printf("YES\n");
    }else{
      printf("NO\n");
    }
  }
  return 0;
}

C++: #include <iostream>
#include <cmath>
#include <vector>
#include <array>
#include <algorithm>
#include <functional>

using namespace std;


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

	vector<bool> result(n);

	array<int, 3> triangle;
	for(int i = 0; i < n; i++){
		cin >> triangle[0] >> triangle[1] >> triangle[2];

		sort(begin(triangle), end(triangle), greater<int>());

		const auto square = bind(pow<int, int>, placeholders::_1, 2);
		result[i] = 
			square(triangle[0]) == square(triangle[1]) + square(triangle[2]);
	}

	for(const bool& b : result){
		cout << (b ? "YES" : "NO") << endl;;
	}

	return 0;
}

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