Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

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

func main() {
	// sc.Split(bufio.ScanLines)
	sc.Split(bufio.ScanWords)
	n, _ := strconv.Atoi(read())
	s := make([]int, 3)
	for i := 0; i < n; i++ {
		s[0], _ = strconv.Atoi(read())
		s[1], _ = strconv.Atoi(read())
		s[2], _ = strconv.Atoi(read())
		sort.Sort(sort.IntSlice(s))
		if (s[2] * s[2]) == ((s[0] * s[0]) + (s[1] * s[1])) {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

C++: //clang 3.8.0

#include  <stdio.h>

int main(void)
{
    int *a, *b, *c;
    int n, i, temp;
    
    scanf("%d", &n);
    
    a = (int *)malloc(sizeof(int) * n);
    b = (int *)malloc(sizeof(int) * n);
    c = (int *)malloc(sizeof(int) * n);
    
    for(i = 0; i < n; i ++){
        scanf("%d %d %d", &a[i], &b[i], &c[i]);
        
        if(a[i] > b[i]){
            if(a[i] > c[i]){
                temp = c[i];
                c[i] = a[i];
                a[i] = temp;
            }else{
                //no_problem
            }
        }else if(b[i] > c[i]){
            temp = c[i];
            c[i] = b[i];
            b[i] = temp;
        }else{
            //no_problem
        }
    }
    
    for(i = 0; i < n; i ++){
        printf("%s\n", (a[i] * a[i] + b[i] * b[i] == c[i] * c[i]) ? ("Yes") : ("No"));
    }
    
    free(a); free(b); free(c);
}

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

C++: #include <iostream>
#include <cstdio>
#define NMAX (1000)
using namespace std;
int main(void){
    
    int N = 0;
    int a=0;
    int b=0;
    int c=0;

    //N??°?????\???
    scanf("%d",&N);
    
    //N?????°???????????????a,b,c???????????????
    for(int Ncount = 0; Ncount < N; Ncount++){
        scanf("%d %d %d",&a,&b,&c);
        if( ((a*a) + (b*b))  == (c*c) ){ 
            printf("YES\n"); 
        }else if( (b*b) + (c*c)  == (a*a) ){
            printf("YES\n"); 
        }else if( (c*c) + (a*a)  == (b*b) ){ 
            printf("YES\n"); 
        }else{ 
            printf("NO\n"); 
        }
    }
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
main(){
	int a[3],n;
	cin>>n;
	while(--n+1){
		for(int i=0;i<=2;++i){
			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;
	}
}

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

using namespace std;

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

		return 0;
}

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

using namespace std;

int main(){
	
    int n;
    
    while( cin >> n ) {
    
    while( n-- ) {
    	
    	int L[3];
    	
    	for(int i=0;i<3;i++)
    	cin >> L[i];
	
		sort(L, L+3);
		
		if( L[0] * L[0] + L[1] * L[1] == L[2] * L[2] )
		cout << "YES\n";
		
		else
		cout << "NO\n";
	}
	}
    return 0;
}

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

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

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

int main(){
  int N,i,a,b,c;

  scanf("%d",&N);
  for(i = 0;i<N;i++){
    cin >> a >> b >> c;
    a*=a;
    b*=b;
    c*=c;
    if(a+b==c||b+c==a||a+c==b)cout << "YES" << endl;
    else cout << "NO" << endl;

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

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

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

#include <iostream>
#include <vector>
#include <deque>
#include <queue>
#include <map>
#include <algorithm>


using namespace std;

#define Max INT_MAX
#define Inf (INT_MAX/2)
#define Min INT_MIN


#define rep(i, n) for(int i = 0; i < n; i++)
#define repi(i,l,n) for(int (i)=(int)(l);(i)<(int)(n);(i)++)
// s <= x < g ?
#define IN(x,s,g) ((x) >= (s) && (x) < (g))
// 0 <= x < w && 0 <= y < h ?
#define ISIN(x,y,w,h) (IN((x),0,(w)) && IN((y),0,(h)))

typedef pair<int, int> P;

int main()
{
    int N;
    cin >> N;
    rep(i,N){
        int a,b,c;
        int d[3];
        cin >> a >> b >> c;
        d[0] = a;
        d[1] = b;
        d[2] = c;
        sort(d, d+3);
        if( pow(d[0],2) + pow(d[1],2) == pow(d[2],2) ){
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }
    return 0;
}

C++: #include <iostream>

inline bool is_right_triangle(u_int a, u_int b, u_int c) {
    return (a*a == b*b + c*c || b*b == c*c + a*a || c*c == a*a + b*b);
}

int main(void) {
    u_int n, a, b, c;

    std::cin >> n;
    while (std::cin >> a >> b >> c) {
        if (is_right_triangle(a, b, c)) {
            std::cout << "Yes" << std::endl;
        } else {
            std::cout << "No" << std::endl;
        }
    }

    return 0;
}

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

int main() {

    int N;
    cin >> N;
 
    int hen[3];
    while (N --> 0) {
        cin >> hen[0] >> hen[1] >> hen[2];
        sort(hen, hen + 3);
        
        if (hen[2] * hen[2] == hen[0] * hen[0] + hen[1] * hen[1]) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }
    

    return 0;
}

C++: #include<iostream>
#include<math.h>
using namespace std;
int main(){
  int n,j=0;
  int a[3];
  cin>>n;
  while(j<n){
    for(int i=0;i<3;i++){
      cin>>a[i];
    }
    sort(a,a+3);
    if(pow(a[2],2)==pow(a[1],2)+pow(a[0],2)){
    cout<<"Yes"<<endl;
  }
  else{
    cout<<"No"<<endl;
  }
  j++;
  }
  return 0;
}

C++: #include <iostream>

bool judgement(int a, int b, int c)
{
	if (a*a == b*b + c*c) {
		return true;
	} else {
		return false;
	}
}

int main()
{
    int x;
	int y;
    int z;
	bool flag[3];
	int n;
	std::cin >> n;
	while (n > 0) {
	    std::cin >> x >> y >> z;
	    flag[0] = judgement(x, y, z);
	    flag[1] = judgement(y, z, x);
	    flag[2] = judgement(z, x, y);
	    if (flag[0] || flag[1] || flag[2]) {
	    	std::cout << "YES" << std::endl;
	    	} else {
	    		std::cout << "NO" << std::endl;
	    		}
	    n --;
	   }
}

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

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

	
	return 0;
}