Go: package main

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

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	n, _ := strconv.Atoi(scanner.Text())
	num := int(n)
	var strs []string
	var a, b, c int
	var res string
	var YES string = "YES"
	var NO string = "NO"
	for i := 0; i < num; i++ {
		scanner.Scan()
		strs = strings.Split(scanner.Text(), " ")
		a, _ = strconv.Atoi(strs[0])
		b, _ = strconv.Atoi(strs[1])
		c, _ = strconv.Atoi(strs[2])

		res = NO
		if c*c == (a*a+b*b) || b*b == (a*a+c*c) || a*a == (b*b+c*c) {
			res = YES
		}
		fmt.Printf("%s\n", res)
	}
}

C++: #include <iostream>

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

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

C++: int main(void)
{
	int a,b,c,i,k;
	int sort[3];
	int num;
	int max,mid,min;
	int d=1,n=3;
	num<=1000;
	
	scanf("%d",&num);
	
	
    while(d<=num){
		scanf("%d %d %d",&sort[0],&sort[1],&sort[2]);
		for(n=3;n<=1;n--){
			for(i=0;i<=n-1;i++){
				if(sort[i]>sort[i+1]){
						k=sort[i];
						sort[i]=sort[i+1];
						sort[i+1]=k;
					}
			}
		}
		max=sort[2];
		mid=sort[1];
		min=sort[0];
		if(max*max==mid*mid+min*min){
			printf("YES\n");
		}else{
			printf("NO\n");
		}
		d++;
	}
	return 0;
}

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

using namespace std;

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

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

using namespace std;

int main()
{
    int a,b,c,d,e,n;
   cin >> n;
   while(n--)
   {
             cin >> a >> b >> c;
             if(c > b && c > a )
             {
               d= (a*a) + (b * b);
               e = (c*c);
             }
             else if( b > c && b > a )
             {
                  d = (a * a) + (c *c);
                  e = (b*b);
                  
             }
             else if(a > c && a > b)
             {
                  d = (b* b) + (c*c);
                  e = (a*a);
             }
             else{
                   d= (a*a) + (b * b);
               e = (c*c);
                  
                  }
             
             if( d == e)
             {
                 cout << "YES\n" ;
                 
             }
             else 
             {
                  cout << "NO\n";
             }
   }
    return 0;
}

C++: #include <stdio.h>

int hantei(int l1,int l2,int l3);
//??´?§?????§???¢??????????????????????????????????????????

int main(void)
{
	int kaisuu, l1, l2, l3;
	int kekka[1000];
	scanf("%d", &kaisuu);
	for(int i = 0; i < kaisuu; i++) {
		scanf("%d %d %d", &l1, &l2, &l3);
		kekka[i] = hantei(l1, l2, l3);
	}
	for(int i = 0; i < kaisuu; i++) {
		if(kekka[i] == 1) {
		 	printf("YES\n");
		}else{
			printf("NO\n");
		}
	}
	return 0;
}

int hantei(int l1,int l2,int l3)
{
	int llong, lshort1, lshort2;
	if(l1 <= l2) {
		lshort1 = l1 * l1;
		if(l2 <= l3) {
			lshort2 = l2 * l2;
			llong = l3 * l3;
		}else{
			lshort2 = l3 * l3;
			llong = l2 * l2;
		}
	}else{
		lshort1 = l2 * l2;
		if(l1 <= l3) {
			lshort2 = l1 * l1;
			llong = l3 * l3;
		}else{
			lshort2 = l3 * l3;
			llong = l1 * l1;
		}
	}
	if(lshort1+ lshort2 == llong) {
		return 1;
	}else{
		return 0;
	}
}

C++: #include <bits/stdc++.h>
#include<cmath>
using namespace std;
int main(int argc, char const *argv[])
{
    int n;
    cin>>n;
    while (n--)
        {
            int a,b,c;
            cin>>a>>b>>c;
            if (a*a + b*b-c*c == 0)
            
                cout<<"YES"<<endl;
                else 
                    cout<<"NO"<<endl;
            
        }
    return 0;
}

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

void F(int *a, int*b) {
	int x;
	x = *a;
	*a = *b;
	*b = x;
}

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

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

C++: #include <bits/stdc++.h>
using namespace std;

int main() {
    int N;
    cin >> N;
    while (N--) {
        vector<int> a(3);
        for (int i = 0; i < 3; ++i) cin >> a[i];
        sort(a.begin(), a.end());
        cout << (a[0] * a[0] + a[1] * a[1] == a[2] * a[2] ? "YES" : "NO") << endl;
    }
}

C++: main(a,b,c){
for(scanf("%*d");~scanf("%d%d%d",&a,&b,&c);puts(((a+b-c)&&(a+c-b)&&(b+c-a))?"NO":"YES")){a*=a,b*=b,c*=c;}
exit(0);
}

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

int N,a,b,c;

int main(){
  cin >> N;
  for(int i = 0; i < N; i++){
    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;
    }
  }
}

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

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

C++: #include <iostream>
using namespace std;
int main(void){

	int n;

	cin >> n;
	for (int i = 0; i < n; i++){

		int a, b, c;
		cin >> a >> b >> c;

		if (a > c){
			int temp = a;
			a = c;
			c = temp;
		}
		if (b > c){
			int temp = b;
			b = c;
			c = temp;
		}

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

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

using namespace std;

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

C++: #include<stdio.h>
int main(void)
{
	int n,i,w,a,s,d,x,j,z;
		scanf("%d",&n);
		for(i=0;i<n;i++){
			scanf("%d %d %d",&a,&s,&d);
			if(a>s&&d<a){
					if(a*a==d*d+s*s){
						printf("YES\n");
					}
					else{
						printf("NO\n");
					}	
			}	
			else if(a<d&&d>s){
					if(d*d==a*a+s*s){
						printf("YES\n");
					}
					else{
						printf("NO\n");
					}				
			}
			else if(a<s&&s>d){
					if(s*s==a*a+d*d){
						printf("YES\n");
					}
					else{
						printf("NO\n");
					}				
			}
			else if(a==s&&s==d&&d==a||a==s||s==d||d==a){
				printf("NO\n");
		}	
		
		}
	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
int n,a,b,c,i;
cin >> n;
for(i=0;i<n;i++){
cin >> a >> b >> c ;
if(a<b+c && b<a+c && c<a+b) cout<< "YES" << endl;else cout << "NO" << endl;
}
return 0;
}

C++: #include <stdio.h>

int main(int argc, char const *argv[])
{
	int a[1000][3];
	int i, j,k, temp;
	int n;
	scanf("%d", &n);
	for(k=0;k<n;k++) {
		scanf("%d%d%d", &a[k][0], &a[k][1], &a[k][2]);
		for(i=2;i>0;i--) {
			for(j=i;j>1;j--) {
				if(a[k][j]<a[k][j-1]) {
					temp = a[k][j];
					a[k][j-1] = a[k][j];
					a[k][j] = temp;
				}
			}
		}
	}
	for(k=0;k<n;k++) {
		if(a[k][0]*a[k][0]+a[k][1]*a[k][1]==a[k][2]*a[k][2]) {
			printf("YES\n");
		} else {
			printf("NO\n");
		}
	}
	return 0;
}

C++: main(a,b,c){
for(
scanf("%*d");~scanf("%d%d%d",&a,&b,&c);
puts(((a+b-c)&&(a+c-b)&&(b+c-a))?"NO":"YES")
)
a*=a,b*=b,c*=c;
exit(0);
}

C++: #include<stdio.h>
#include<math.h>
int main(void)
{
	int n,i,w[1000],a[1000],s[1000],d[1000],x[1000];
	while(scanf("%d",&n)!=EOF){
		for(i=0;i<n;i++){
			scanf("%d %d %d",&a[i],&s[i],&d[i]);
			w[i]=(a[i]*a[i])+(s[i]*s[i]);
			x[i]=d[i]*d[i];
		}
		for(i=0;i<n;i++){
			if(w[i]==x[i]){
				printf("YES\n");
			}
			else{
				printf("NO\n");
			}
		}	
	}
	return 0;
}