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++: #include <bits/stdc++.h>

using namespace std;


#define REP(i,n) for(ll i=0;i<n;++i)
#define RREP(i,n) for(ll i=n-1;i>=0;--i)
#define FOR(i,m,n) for(ll i=m;i<n;++i)
#define RFOR(i,m,n) for(ll i=n-1;i>=m;--i)
#define ALL(v) (v).begin(),v).end()

#define PB(a) push_back(a)
#define MOD 1000000007

typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> VI;
typedef vector<VI> VVI;
const double PI = 3.14159265358979323846;
const double EPS = 1e-12;
const int INF = numeric_limits<int>::max() / 2;
const int NEG_INF = numeric_limits<int>::min() / 2;

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);

  int n;cin>>n;
  for(int j=0;j<n;j++){
      std::vector<int> v(3);
      for(int i=0;i<3;i++) cin>>v[i];
      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;
  }
  return 0;
}

C++: #include<stdio.h>


void swap(int *a, int *b){
	int w = *a;
	*a = *b;
	*b = w;
}


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

	int x, y, z, w;
	for(int i = 0; i < num; i++){
		scanf("%d %d %d", &x, &y, &z);
		if(x > z){
			swap(&x, &z);
		}
		if(y > z){
			swap(&y, &z);
		}
		if(x*x + y*y == z*z){
			printf("YES\n");
		}else{
			printf("NO\n");
		}

	}

	return 0;
}

C++: #include<stdio.h>
#include<ctype.h>
#include<time.h>
#include<math.h>
#include<string.h>
#include<stdlib.h>
#include<algorithm>
using namespace std;
int main()
{
	int ar[3],t;
	scanf("%d",&t);
	while(t--)
	{
		scanf("%d %d %d",&ar[0],&ar[1],&ar[2]);
		sort(ar,ar+3);
		if(ar[2] * ar[2] == ((ar[0] * ar[0]) + ar[1] * ar[1])) printf("YES\n");
		else printf("NO\n");
	}
	return 0;
}

C++: #include <stdio.h>

int main ()
{
    int n=0,i=0,a,b,c;
    scanf("%d",&n);
    if(n<=1000)
    {
    while(n--)
    {
        scanf("%d%d%d",&a,&b,&c);
        if(a>1000 || a<1 || b>1000 || c>1000 || a<1 || b<1 || c<1)
            break;

          if(n==0){
            if(c*c == (a*a + b*b))
            printf("YES");
           else
            printf("NO");
        }
           else{
            if(c*c == (a*a + b*b))
            printf("YES\n");
           else
            printf("NO\n");
        }
    }
    }
    return 0;
}

C++: #include <iostream>

using namespace std;

void swap(int *x, int *y) {
  int temp;
  temp = *x;
  *x = *y;
  *y = temp;
}

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

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

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

  return 0;
}

C++: #include <iostream>
//#include <cstdio>
//#include <cmath>
using namespace std;
 
//0003
int main(){
	int n;
	int a, b, c, a2, b2, c2;
	cin >> n;
	while(--n){
		cin >> a >> b >> c;
		a2 = a^2;
		b2 = b^2;
		c2 = c^2;

		if(a==b==c){
			cout << "NO" << endl;
			break;
		}
		if(a2==b2+c2 || b2==a2+c2 || c2==a2+b2){
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		}
	}
	return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <cmath>
#include <algorithm>
#include <string>
#define shosu(x) fixed<<setprecision(x)
using namespace std;
typedef pair<int,int> P;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int,P> pip;
const int inf=(1<<31)-1;

int n;

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

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

using namespace std;

int main(){
  int n; cin>>n;
  while(n --> 0){
    int a[3]; cin>>a[0]>>a[1]>>a[2];
    sort(a, a+3);
    cout << (a[0]*a[0]+a[1]*a[1] == a[2]*a[2] ? "YES" : "NO") << endl;
  }
  return 0;
}

C++: #include <iostream>
#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^2) + (b^2)  == (c^2) ){ printf("YES\n"); }
        else if( (b^2) + (c^2)  == (a^2)){ printf("YES\n"); } 
        else if( (c^2) + (b^2)  == (a^2)){ printf("YES\n"); }
        else{ printf("NO\n"); }
    }
}

C++: #include<iostream>

using namespace std;

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

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

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

int main(){

	 array<int, 3> temp;
	 int N;

	 cin >> N;
	 
	 for (int i = 0; i < N; ++i) {
		 for (auto& a : temp) {
			 cin >> a;
		 }
		 sort(temp.begin(), temp.end());

		 if (temp[0] * temp[0] + temp[1] * temp[1] == temp[2] * temp[2]) {
			 cout << "YES" << endl;
		 }
		 else {
			 cout << "NO" << endl;
		 }
	 }
	return 0;
}

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

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

C++: #include<iostream>
#include<iomanip>
#include<string>
#include<algorithm>
#include<cmath>
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||a*a+c*c==b*b||b*b+c*c==a*a){
            cout<<"Yes"<<endl;
        }else{
            cout<<"No"<<endl;
        }
    }
    return 0;
}

C++: #include<stdio.h>

int main(){
        int i = 0;
        int n,len[3];
        scanf("%d",&n);
        while(i != n){
                scanf("%d %d %d",&len[0],&len[1],&len[2]);
                if(len[0] * len[0] + len[1] * len[1] == len[2] * len[2])
                        printf("YES\n");
                else
                        printf("NO\n");
                i++;
        }
        return 0;
}

C++: #include <iostream>
#include <vector>
using namespace std;
int main(){
	int n;
	vector<int> a(3);
	cin >> n;
	for(int i=0;i<n;i++){
		cin>>a[0]>>a[1]>>a[2];
		sort(a.begin(),a.end());
		if(a[2]*a[2]==a[0]*a[0] + a[1]*a[1]){
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		}
	}
}

C++: #include <iostream>
using namespace std;
int main(void){
    int N;
    cin >>N;
    int a,b,c;
    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;
        }
    }
}