Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func nextInt() int {
	scanner.Scan()
	i, e := strconv.Atoi(scanner.Text())
	if e != nil {
		panic(e)
	}
	return i
}
func main() {
	scanner.Split(bufio.ScanWords)
	n := nextInt()
	for i := 0; i < n; i++ {
		a := nextInt()
		b := nextInt()
		c := nextInt()
		if a*a == b*b + c*c || b*b == a*a + c*c || c*c == a*a + b*b {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
		continue
	}
}

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"<<std::endl};
  else if(b*b==a*a+c*c) {std::cout<<"YES"<<std::endl};
  else if(c*c==a*a+b*b) {std::cout<<"YES"<<std::endl};
  else std::cout<<"NO"<<std::endl;
  

	
	return 0;
}

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

int main(){
    int length[3];
    int n,A,B,C;
    cin >> n;
 
    for(int i=0;i<n;i++){
        cin >> length[0] >> length[1] >> length[2];       
        A = length[0] * length[0];
        B = length[1] * length[1];
        C = length[2] * length[2];
        if(A+B==C||B+C==A||C+A==B){
            cout << "Yes" << endl;
        }else{
            cout << "No" << endl;
        }
    }
}

C++: #include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <vector>
#include <string>
#include <queue>
#include <algorithm>
#include <math.h>
#include <utility>
#include <set>
#include <map>
#define INF 100000
using namespace std;

int main(){
    int n;
    cin >> n;
    for (int i=0; i<n; i++) {
        vector<int> sa;
        for (int j=0; j<3; j++) {
            int inp;
            cin >> inp;
            sa.push_back(inp);
        }
        sort(sa.begin(), sa.end());
        if (sa[0]*sa[0]+sa[1]*sa[1]==sa[2]*sa[2]) {
            cout << "YES"<<endl;
        }else{
            cout << "NO"<<endl;
        }
    }
    
}

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

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


if(a*a+b*b==c*c||a*a+c*c==b*b||b*b+c*c==a*a) {cout<<"YES"<<endl;}
else{cout<<"NO"<<endl;}	
}

// your code goes here
	return 0;
}

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

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