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 <iostream>
using namespace std;

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

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

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

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

int main() {
  int ct = 0;
  vector<int> v(3);
  queue<bool> q;

  scanf("%d", &ct);
  for(int i = 0; i < ct; i++) {
    scanf("%d %d %d", &v[0], &v[1], &v[2]);
    sort(v.begin(), v.end());
    q.push(v[2] * v[2] == v[0] * v[0] + v[1] * v[1] ? true : false);
    v.clear();
  }
  for(int i = 0; i < ct; i++) {
    printf("%s\n", q.front() == true ? "YES" : "NO");
    q.pop();
  }
  return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<vector>
#include<cmath>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define REP(a) while(a--)
#define pb push_back
#define mp make_pair
#define it ::iterator
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
const double EPS=1e-10;
using namespace std;
typedef long long ll;
typedef vector<int> vi;
int main(){
	int n;
	cin>>n;
	REP(n){
		vi in(3);
		rep(i,3)cin>>in[i];
		sort(all(in));
		if(in[0]*in[0]+in[1]*in[1]==in[2]*in[2])cout<<"YES"<<endl;
		else cout<<"NO"<<endl;
	}

}

C++: #include <stdio.h>
 
using namespace std;
 
 
int main(){
    int n,a,b,c,A,B,C;
    scanf("%d",&n);
 
    for(int i=0;i<n;i++){
        scanf("%d %d %d",&a,&b,&c);
        A = a*a;
        B = b*b;
        C = c*c;
        if(A+B==C||B+C==A||C+A==B){
            printf("YES\n");
        }else{
            printf("NO\n");
        }
    }
 
    return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main(void){
    int n,a,b,c;
    std::deque<int> deq;
    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;
        }
    }
    
    
}

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

using namespace std;

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

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

//??´?§?????§???¢?????????????????????????????¢??°
int triangle(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 1; //??´?§?????§???¢??§????????¨???
  }
  else
    return 0; //??´?§?????§???¢??§????????¨???
}

int main(){
  int a, b, c; //3???????????°
  int n; //???????????????????????°
  
  //std::cout << "Input the number of dataset\n";
  std::cin >> n;

  int ans[n];
  for(int i=0; i<n; i++){
    std::cin >> a >> b >> c;
    ans[i] = triangle(a, b, c);
  }

  for(int i=0; i<n; i++){
    if(ans[i] == 1)
      std::cout << "YES\n";
    else if(ans[i] == 0)
      std::cout << "NO\n";
  }
  
  return 0;
  
}

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


int main(){
	int i;
	deque<int> nums;

	cin >> i;

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

		nums.push_front(a);
		nums.push_front(b);
		nums.push_front(c);

		sort(nums.begin(), nums.end());

		a = nums[0];
		b = nums[1];
		c = nums[2];

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

	}

	return 0;
}

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

int N;
int a[3]; 
int b,c,d;

int main() {
  for (int i = 0; i < N; ++i) {
    cin >> a[1] >> a[2] >> a[3];
    sort(a,a+3);
    b = a[1]*a[1];
    c = a[2]*a[2];
    d = a[3]*a[3];
    if ( d + c == b ) {
      printf("YES\n");
    } else {
      printf("NO\n");
    }
  }
  
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
int main ()　{
	int v[3]; cin >> v[0];
	while (cin >> v[0] >> v[1] >> v[2])
		sort (v, v+3), cout << (*v**v + *(v+1)**(v+1) == *(v+2)**(v+2) ? "YES" : "NO") << endl;
}

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

int check(int a,int b,int c){
	if(a*a+b*b==c*c) return 1;
	else return 0;
}

int main(){
	int n;
	cin>>n;
	for(int i=0;i<n;i++){
		int a,b,c;
		int aa,bb,cc;
		cin>>a>>b>>c;
		aa=a<b?a:b;
		bb=a<b?b:a;
		cc=b<c?c:b;
		bb=b<c?b:c;
		int ans=check(aa,bb,cc);
		if(ans) cout<<"YES"<<endl;
		else    cout<<"NO"<<endl;
	}
	return 0;
}

C++: #include <stdio.h>
int main(){
   int n;
   scanf("%d",&n);
   for(int i = 1;i <= n;++i){
     int a,b,c;
      scanf("%d%d%d",&a,&b,&c);
     if(a*a+b*b==c*c||a*a+c*c == b*b||b*b+c*c == a*a){
     printf("YES\n");
}else{
     printf("NO\n");
}

}
}

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

int main(void){
	int x[3];
	int d,i = 0;
	cin >> d;
	string n = "NO", y = "YES";
	while(i < d){
		sort(x,x + 3);
		if(x[2] <= x[1] + x[0])
			cout << y << endl;
		else
			cout << n << endl;
		i++;
	}
	return 0;
}

C++: #include <iostream>
#include <stdio.h>
#include <vector>
#include <algorithm>
#include <math.h>

int main() {
    int n;
    std::vector<int> V;
    
    scanf("%d", &n);
    for (int i = 0; i < n; i++) {
        int a, b, c; std::cin >> a >> b >> c;
        V.push_back(pow(a,2)); V.push_back(pow(b, 2)); V.push_back(pow(c, 2));
        std::sort(V.begin(), V.end());
        if (V[2] == V[1] + V[0]) printf("YES\n");
        else printf("NO\n");
    }
    
    return 0;
}

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

	for ( int c = 0; c < n; c++ )
	{
		vector <int> vertexs;
		for ( int i = 0; i < 3; i++ )
		{
			int vertex;
			cin >> vertex;
			vertexs.push_back( vertex );
		}

		sort( vertexs.begin(), vertexs.end() );

		bool ok = false;
		do
		{
			if ( vertexs[0] * vertexs[0] == vertexs[1] * vertexs[1] + vertexs[2] * vertexs[2] )
			{
				ok = true;
			}
		} while ( next_permutation( vertexs.begin(), vertexs.end() ) );

		if ( ok )
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}

	return 0;
}

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

#define DEBUG

#ifndef DEBUG 
#define fprintf (void)
#endif 

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

C++: #include <bits/stdc++.h>
#include <iostream>
#include <string>
#include <stdio.h>
#include <math.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using ll = long long;
typedef long double lb;
using namespace std;
int main(){
  int N;
  cin >> N;
  for(int i = 1; i <= N; i++){
    ll P,Q,R;
    cin >> P >> Q >> R;
    int O = max(P,max(Q,R));
    if(O * O == P * P + Q * Q + R * R - O * O){
      cout << "YES" << endl;
    }
    else{
      cout << "NO" << endl;
    }
  }
}