Go: package main

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

var sc = bufio.NewScanner(os.Stdin)
var out = bufio.NewWriter(os.Stdout)

func main() {
	sc.Split(bufio.ScanWords)
	defer out.Flush()
	n := nextInt()
	for i := 0; i < n; i++ {
		data := nextInts(3)
		fmt.Fprintln(out, checkTriangle(data))
	}
}

func next() string {
	sc.Scan()
	return sc.Text()
}

func nextInt() int {
	a, _ := strconv.Atoi(next())
	return a
}

func nextInts(n int) []int {
	a := make([]int, n)
	for i := 0; i < n; i++ {
		a[i] = nextInt()
	}
	return a
}

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

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

#define DEBUG

#ifndef DEBUG 
#define fprintf (void)
#endif 

int main(void){
	
	long int rec,i,j,t;
	int count=0;
	long int n[3]={0,0,0};
	
	scanf("%d",&t);
	
	for(i=0;i<t;i++){
		for(j=0;j<3;j++){
			scanf("%ld",&rec);
			if(rec==0){
				count=1;
			}
			if(rec>n[0]){
				n[2]=n[1];
				n[1]=n[0];	
				n[0]=rec;
			}else if(rec>n[1]){
				n[2]=n[1];
				n[1]=rec;
			}else if(rec>n[2]){
				n[2]=rec;
			}
		}
		if(count=1){
			printf("NO\n");
		}else if(n[0]*n[0]==n[1]*n[1]+n[2]*n[2]){
			printf("YES\n");
		}else{
			printf("NO\n");
		}
	}
	
	return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
	int num;
	cin>>num;
	for(int i=0;i<num;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>
#include <queue>
#include <cmath>

using namespace std;

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

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

using namespace std;

int main(){
  int a, b, c, a2, b2, c2;
  while(cin>>a>>b>>c){
    a2= a*a;
    b2= b*b;
    c2= c*c;

    if((a2+b2==c2)||(b2+c2==a2)||(a2+c2==b2)){
      cout<<"YES"<<endl;
    }else{
      cout<<"NO"<<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 ) 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)||(b*b==a*a+c*c)||(c*c==a*a+b*b))
            printf("YES\n");
        else
            printf("NO\n");
    }

    return 0;
}

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

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

C++: #include <iostream>
#include <math.h>
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==c*c+a*a||c*c==a*a+b*b)cout<<"YES"<<endl;
		else cout<<"NO"<<endl;
	}
	
	return 0;
}

C++: #include <stdio.h>
#include <math.h>
int main(void) {
	int a, b, c, t, x, y;
	
	scanf("%d",&a);
	scanf("%d",&b);
        scanf("%d",&c);
	t = a ; x = b ; y = c; 
	if(t<=b){
		t = b ; x = c ; y = a ;
	}
	else{}
	if(t<=c){
		t = c ; x = a ; y = b ;
	}
	else{}
	t = pow(t,2) ;x = pow(x,2); y = pow(y,2);
	if(t==sqrt(x+y)){
		printf("YES");
	}
	else{
		printf("NO");
	}
	return 0;
}

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

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

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

static const int DataMax = 200;	// Max value of elements

typedef struct _triangle
{
    int count;	// Number of elements
    std::vector<int> vec[DataMax];
} triangle_t;

static void inputData(triangle_t& data, int& num)
{
    int v1, v2, v3;

    if (0x00 == &data) {
        std::cerr << "data is null" << std::endl;
        return;
    }

    std::cin >> num;
    for (int i = 0; i < num; i++) {
        std::cin >> v1 >> v2 >> v3;
        data.vec[data.count].push_back(v1);
        data.vec[data.count].push_back(v2);
	data.vec[data.count].push_back(v3);
        data.count++;
    }
}

static bool isRightTriangle(std::vector<int>& vec)
{
    if (0x00 == &vec) {
        std::cerr << "vec is null" << std::endl;
        return false;
    }

    if ((int)pow((double)vec.at(0), 2.0) + (int)pow((double)vec.at(1), 2.0) == (int)pow((double)vec.at(2), 2.0)) {
        return true;
    }

    return false;
}

int main()
{
    triangle_t triangle = {0};
    int num = 0;

    inputData(triangle, num);
    for (int i = 0; i < num; i++) {
        if (true == isRightTriangle(triangle.vec[i])) {
            std::cout << "YES" << std::endl;
        } else {
            std::cout << "NO" << std::endl;
        }
    }

    return 0;
}

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


int main(){

  int n;
  cin >> n;

  vector <int> array(n,0);

  for(int i = 0; i < n;i++){
    cin >> array[0] >> array[1] >> array[2];
    sort(array.begin(),array.end());

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


  return 0;
}

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

int main() {
    std::array<long long int, 3> arr;;
    int n;
    
    std::cin >> n;

    while (n--) {
        std::cin >> arr[0] >> arr[1] >> arr[2];
        std::sort(arr.begin(), arr.end());
        std::cout << (std::pow(arr[0], 2) + std::pow(arr[1], 2)
                      == std::pow(arr[2], 2) ? "YES" : "NO")
                  << std::endl;
    }

    return 0;
}

C++: #include<stdio.h>
#include<math.h>
int main(void)
{
	int k[100][3],ct;
	int mem;
	scanf("%d",&ct);
	for(int f1=0;f1<ct;f1++){
		scanf("%d %d %d",&k[f1][0],&k[f1][1],&k[f1][2]);
	}
	for(int f=0;f<ct;f++){
		for(int f1=0;f1<3;f1++){
			for(int f2=0;f2<3;f2++){
				if(k[f][f1]>k[f][f2]){
					mem=k[f][f1];
					k[f][f1]=k[f][f2];
					k[f][f2]=mem;
				}
			}
		}
	}
	for(int f1=0;f1<ct;f1++){
		if(pow((double)k[f1][0],2)==pow((double)k[f1][1],2)+pow((double)k[f1][2],2)){
			printf("YES\n");
		}
		else{
			printf("NO\n");
		}
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
int main()
{
	int N,A[1000],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)
		{
			A[i] = 1;
		}
		else
		{
			A[i] = 0;
		}
	}
	for (int j = 0; j < N; j++)
	{
		if (A[j] == 1)
		{
			cout << "YES" << endl;
		}
		else
		{
			cout << "NO" << endl;
		}
	}
}