Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func main() {
	sc.Split(bufio.ScanWords)
	li := make([]int, 3)

	sc.Scan()
	N, _ := strconv.Atoi(sc.Text())

	for i := 0; i < N; i++ {
		for j := 0; j < 3; j++ {
			sc.Scan()
			x, _ := strconv.Atoi(sc.Text())
			li[j] = x
		}
		sort.Ints(li)

		switch li[2]*li[2] == li[1]*li[1]+li[0]*li[0] {
		case true:
			fmt.Println("YES")
		case false:
			fmt.Println("NO")
		default:
		}
	}

}

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

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

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

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

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

C++: #include<iostream>

unsigned short a, b, c;
bool flag;

int main()
{
	while(std::cin>>a>>b>>c)
	{
		if (a==0||b==0||c==0)
		{
			continue;
		}

		flag = false;
		if((a*a)+(b*b)==(c*c))
		{
			flag = true;
		}
		else if((a*a)+(c*c)==(b*b))
		{
			flag = true;
		}
		else if((b*b)+(c*c)==(a*a))
		{
			flag = true;
		}
		if(flag==false)
		{
			printf("NO\n");
		}
		else
		{
			printf("YES\n");
		}
	}
	return 0;
}

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 > b) swap(a, b);
        if (b > c) swap(b, c); //max = c
        if (c*c == (a*a + b*b) ) cout << "YES" << endl;
        else cout << "NO" << endl;
    }
    return 0;
}

C++: #include<iostream>

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

    return 0;
}

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

using namespace std;


int main()
{
    int num;
    int tmp;
    vector<int> store_num;
    
    cin >> num;
    for (int i = 0; i < num; i++)
    {
        store_num.clear();
        for (int j = 0; j < 3; j++)
        {
            cin >> tmp;
            store_num.push_back(tmp);
        }
        
        sort(store_num.begin(), store_num.begin() + 3);
        if ((store_num[0] * store_num[0]) + (store_num[1] * store_num[1]) == (store_num[2] * store_num[2]))
        {
            cout << "YES" << endl;
        }
        else
        {
            cout << "NO" << endl;
        }
    }
    
    return 0;
}

C++: #include <iostream>

bool judge(int x, int y, int z);

int main()
{
    int data_num;
    std::cin >> data_num;

    int side1, side2, side3;
    while (data_num--) {
        std::cin >> side1 >> side2 >> side3;
        std::cout << (judge(side1, side2, side3)? "YES": "NO") << std::endl;
    }

    return 0;
}

int pow2(int x);

bool judge(int x, int y, int z)
{
    if (pow2(x) == pow2(y) + pow2(z)) {
        return true;
    } else if (pow2(y) == pow2(z) + pow2(x)) {
        return true;
    } else if (pow2(z) == pow2(x) + pow2(y)) {
        return true;
    } else {
        return false;
    }
}

int pow2(int x)
{
    return (x * x);
}

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

int compare_int(const void *a, const void *b)
{
  return *(int*)a - *(int*)b; 
}

int main()
{
  int n;
  int xs[3];

  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d %d %d", &xs[0], &xs[1], &xs[2]);
    qsort(xs, 3, sizeof(int), compare_int);
    if (pow(xs[0], 2.0) + pow(xs[1], 2.0) == pow(xs[2], 2.0)) {
      printf("YES\n");
    } else {
      printf("NO\n");
    }
  }

  return 0;
}

C++: #include <stdio.h>

void right_triangle (int x, int y, int z)
{
    if(x * x = y * y + z * z || y * y = z * z + x * x || z * z = x * x + y * y){
        printf("YES\n");
    } else {
        printf("NO\n");
    }
}

int main(void)
{
    int n;
    scanf("%d", &n);
    for (int i = 0; i < n; ++i){
        int x, y, z;
        scanf("%d %d %d", &x, &y, &z);
        right_triangle(x, y, z);
    }
    return 0;
}

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

int main(){
	int n=0,i=0,k=0,a,b;
	int x[3000] = {0} ;

	while(1){
		cin >> n ;

		if(n <= 1000) break ;
	}

	for(i=0;i<3*n;i+=3){

		while(1){

			cin >> x[i] >> x[i+1] >> x[i+2] ;

			if((x[i] >= 1) && x[i] <=1000){
				if((x[i+1] >= 1) && x[i+1] <=1000){
					if((x[i+2] >= 1) && x[i+2] <=1000){
						break;
				}
			}
		}
		}
		if(x[i+1] > x[i]) {
			k = x[i+1];
			x[i+1] = x[i];
			x[i] = k ;
		}
		if(x[i+2] > x[i]) {
			k = x[i+2];
			x[i+2] = x[i];
			x[i] = k ;
		}
		if(x[i+2] > x[i+1]) {
			k = x[i+2];
			x[i+2] = x[i+1];
			x[i+1] = k ;
		}
	}

	for(i=0;i< 3*n; i+=3){
		a = x[i] * x[i] ;
		b = (x[i+1] * x[i+1] ) + (x[i+2] * x[i+2]) ;

		if( a == b) cout << "YES" << endl ;
		if( a != b) cout << "NO" << endl ;

	}

    return 0;
}

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


string Judge_triangle(int a,int b,int c){
    if(a+b>c && b+c>a && c+a>b){
        return "YES";
    }
    else{
        return "NO";
    }
}

bool Judge_line(int x){
    if(1<=x || x<=1000 || ceil(x) == floor(x))
        return true;
    else
        return false;
}

int main(){
  int N;
  int a,b,c;
  int n=0;
    
    while(1){

  cin >> N;
    
        if(N > 1000 || ceil(N) != floor(N)){
            
        }
    else
        break;
    }
    
    string x[N];

while(N > 0 && cin >> a >> b >> c){
    
    
    while(1){
        if(Judge_line(a) && Judge_line(b) && Judge_line(c)){
            x[n] = Judge_triangle(a,b,c);
            N--;
            n++;
            break;
        }
        
        else{
            break;
        }
  }
}
    for(int i = 0;i < n;i++)
        cout << x[i] << endl;
    
  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];
    for(int j=0;j<3;j++){
      cin>>a[j];
    }
    sort(a,a+3,greater<int>());
    if(a[0]*a[0]==a[1]*a[1]+a[2]*a[2])cout<<"YES"<<endl;
    else cout<<"NO"<<endl;
  }
  return 0;
}

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

void sjx(double a, double b, double c)
{
	if (a < b + c && b < a + c && c < a + b)
		cout << "yes" << endl;
	else
		cout << "no" << endl;
}
int main()
{
	int a;

C++: #include <iostream>

int main(int argc, char **argv) {
	int num, i, a, b, c;
	
	std::cin >> num;
	
	for(i = 0; i < num; 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" << std::endl;
		} else {
			std::cout << "NO" << std::endl;
		}
	}
}

C++: #include "stdafx.h"
#include <iostream>
using namespace std;
int n;
int main()
{
	cin >> n;
	int i,a[1000],b[1000],c[1000],x[1000],y[1000],z[1000],res[1000];
	for (i = 0; i < n; i++) {
		cin >> a[i] >> b[i] >> c[i];
		x[i] = a[i];
		if (x[i] < b[i]) {
			y[i] = x[i];
			x[i] = b[i];
		}
		else {
			y[i] = b[i];
		}
		if (x[i] < c[i]) {
			z[i] = y[i];
			y[i] = x[i];
			x[i] = c[i];
		}
		else if (y[i] < c[i]) {
			z[i] = y[i];
			y[i] = c[i];
		}
		else {
			z[i] = c[i];
		}
	}
	for (i = 0; i < n; i++) {
		res[i] = x[i] * x[i] - z[i] * z[i] - y[i] * y[i];
		if (res[i] == 0) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}
	return 0;
}