Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func main() {
	sc.Scan()
	l, _ := strconv.Atoi(sc.Text())
	for i := 0; i < l; i++ {
		sc.Scan()
		s := strings.Split(sc.Text(), " ")
		a, _ := strconv.Atoi(s[0])
		b, _ := strconv.Atoi(s[1])
		c, _ := strconv.Atoi(s[2])

		n := []int{a, b, c}
		sort.Sort(sort.IntSlice(n))

		if square(n[0])+square(n[1]) == square(n[2]) {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

func square(x int) int {
	return x * x
}

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

int max(int,int,int);

int main(void){
  int n;
  
  scanf("%d",&n);

  int tri[n][3];
  
  int i=0;
  for(i;i<n;i++){
      scanf("%d %d %d",&tri[i][0],&tri[i][1],&tri[i][2]);
	}

  i=0;
  int judge[n];
  for(i;i<n;i++){
    int j=1;
    for(j;j<3;j++){
	if(tri[i][0]<tri[i][j]){
	  int t=tri[i][0];
	  tri[i][0]=tri[i][j];
	  tri[i][j]=t;
	}
      }
    j=1;
    for(j;j<3;j++){
	if(tri[i][0]<tri[i][j]){
	  int t=tri[i][0];
	  tri[i][0]=tri[i][j];
	  tri[i][j]=t;
	}
      }
    if(pow(tri[i][0],2.0)==pow(tri[i][1],2.0)+pow(tri[i][2],2.0))
      judge[i] = 1;
    if(judge[i]==1)
      printf("YES\n");
    else
      printf("NO\n");
  }
}

C++: #include<stdio.h>
#include<string.h>
#define N 3

int main()
{
    int i, j, a, b, c;
    int A[N][N];

    scanf("%d",&a);
    if(a<=1000){
        for(i=0;i<a;i++){
            for(j=0;j<N;j++){
                scanf("%d", &b);
                if(1>b || b>1000){   
                    return 1;
                }else{
                    if(j!=0 && b<A[i][j-1]){
                        c = A[i][j-1];
                        A[i][j-1] = b;
                        A[i][j] = c;
                    }else{
                        A[i][j] = b;
                    }
                }
            }

        }
        for(i=0;i<a;i++){
            if(A[i][0]*A[i][0]+A[i][1]*A[i][1]==A[i][2]*A[i][2]){
                printf("YES\n");
            }else{
                printf("NO\n");
            }
        }
    }
    return 0;
}

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

int main(){
	int n;
	int in[3];
	bool ans[1000];
	std::cin >> n;
	for (int i = 0; i < n; ++i){
		std::cin >> in[0] >> in[1] >> in[2];
		std::sort(std::begin(in), std::end(in));
		ans[i] = (in[2] * in[2] == in[0] * in[0] + in[1] * in[1]);
	}
	for (int i = 0; i < n; ++i){
		if (ans[i])std::cout << "YES" << std::endl;
		else std::cout << "NO" << std::endl;
	}
	return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <algorithm>
#include <string>
#include <set>
#include <map>
#include <queue>
using namespace std;
typedef long long int ll;
const int INF = 100000000;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
int main(){
    int n;
    cin >> n;
    rep(i, n){
        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>
using namespace std;

int main(){

int num;


cin >> num;

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

return 0;
}

C++: #include<iostream>
using namespace std;
int main(void){
   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 if(c*c + a*a == b*b )    cout<<"YES"<<endl;
            else if(b*b + c*c == a*a)    cout<<"YES"<<endl;
            else    cout<<"NO"<<endl;
        }
    return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n,a,b,c;
    cin >> n;
    while(n--){
        cin >> a >> b >> c;
        if(a<b) swap(a,b);
        if(a<c) swap(a,c);
        if((a*a)==(b*b+c*c))    cout << "YES\n";
        else cout << "NO\n";
    }
}

C++: #include<iostream>

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

	

    return 0;
}

C++: #include<bits/stdc++.h>

using namespace std;

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

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

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

  cin >> N;
    
    if(N <= 0 || N > 1000)
        
    else
        break;
    }
    
    string x[N];

while(N > 0 && cin >> a >> b >> c){
    
    
    while(1){
        if(a < 1 || a > 1000 || b < 1 || b > 1000 || c < 1 || c > 1000){
            
            break;
        }
        
        else{
    if(a+b>c && b+c>a && c+a>b){
        x[n]="YES";
    }
    else{
        x[n]="NO";
    }
            N--;
            n++;
            break;
        }
  }
}
    for(int i = 0;i < n;i++)
        cout << x[i] << endl;
    
  return 0;
}

C++: #include <string>
#include <algorithm>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <memory>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <utility>
#include <vector>


using namespace std;

string tri(int a, int b, int c){
	if(a*a + b*b == c*c || b*b + c*c == a*a || c*c + a*a == b*b)return "YES";
	return "NO";
}

int main(void) {
	int len, a, b, c;
	cin >> len;
	for(int i = 0; i < len; i++){
		cin >> a >> b >> c;
		cout << tri(a, b, c) << endl;
	}
}

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

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

int main(){
	int n;
	cin >> n;
	vector<char*> s;
	for(int i=0;i<n;++i){
		int a[3];
		scanf("%d %d %d",a,a+1,a+2);
		sort(a,a+3);
		if(a[0]*a[0]+a[1]*a[1] == a[2]*a[2])
			s.push_back("YES\n");
		else
			s.push_back("NO\n");
	}
	for(int i=0;i<n;++i)
		cout << s[i];
	return 0;
}

C++: #include <iostream>
#include <queue>
#include <vector>
#include <math.h>
#include <algorithm>
using namespace std;

int main(){
	int num;
	cin >> num;
		priority_queue<int> pq;
	for (int i = 0; i < num; ++i) {
		for (int j = 0; j < 3; ++j) {
			int a;
			cin >> a;
			pq.push(a);
		}
		int a, b, c;
		a = pq.top();
		pq.pop();
		b = pq.top();
		pq.pop();
		c = pq.top();
		pq.pop();
		if (a * a == b * b + c * c) {
			cout << "YES" << endl;
		} else {
			cout << "NO" << endl;
		}
	}
	return 0;
}

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(c*c == a*a+b*b || a*a == b*b+c*c || b*b == a*a+c*c){
        cout << "YES" <<endl;

    }
    else {cout << "NO" <<endl;
    }
    
    }
    
}

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