Go: package main
import (
    "fmt"
    "os"
    "bufio"
    "strconv"
    "sort"
)
 
var sc = bufio.NewScanner(os.Stdin)
var out = bufio.NewWriter(os.Stdout)
 
func main(){
    sc.Split(bufio.ScanWords)
    defer out.Flush()
    n := nextInt()
    for i:=0; i<n; i++{
        data := nextInts(3)
        sort.Ints(data)
        if data[0]*data[0]+data[1]*data[1] == data[2]*data[2]{
            fmt.Fprintln(out, "YES")
        }else{
            fmt.Fprintln(out, "NO")
        }
    }
}
 
func next() string{
    sc.Scan()
    return sc.Text()
}
 
func nextInt() int{
    a, _ := strconv.Atoi(next())
    return a
}
 
func nextInts(n int) []int{
    a := make([]int, n)
    for i:=0; i<n; i++{
        a[i] = nextInt()
    }
    return a
}

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

using namespace std;

void solve(int a, int b, int c) {
	bool f = false;
	int max_num = max(a, max(b, c));
	int sub1, sub2;
	if (max_num != a) {
		sub1 = a;
		if (max_num != b) sub2 = b;
		else sub2 = c;
	} else if (max_num != b) {
		sub1 = b;
		sub2 = c;
	} 		
	if (pow(max_num, 2) == pow(sub1, 2) + pow(sub2, 2)) f = true;
	if (f) cout << "YES" << endl;
	else cout << "NO" << endl;
}

int main() {
	int num, a, b, c;
	cin >> num;
	for (int i=0; i<num; i++) {
		cin >> a >> b >> c;
		solve(a,b,c);
	}
	return 0;
}

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


int main(){
	int N;
	cin >> N;
	while(N--){
		int i[3],c;
		int max;
		cin >> i[0] >> i[1] >> i[2];
		sort(i,i+2);
		if(i[0]*i[0]+i[1]*i[1]==i[2]*i[2])
			cout<<"YES\n";
		else
			cout<<"NO\n";

	}
}

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];
  m = *max_element(list[i],list[i]+3);
  if(accumulate(list[i],list[i]+3,0) - m > m) cout<<"YES"<<endl;
  else cout<<"NO"<<endl;
  }
  return 0;
}

C++: import sys

array = []

for line in sys.stdin:
    try:
        array = [int(x) for x in line.split()]
        array.sort()
        if array[2]**2 == (array[0]**2+array[1]**2):
            print('YES')
        else:
            print('NO')
    except(ValueError):
        continue

C++: /// Coded by Dhiman Sarker Bappy (Dhimanda) - RMSTU

#include<bits/stdc++.h>
using namespace std;
#define in_file freopen("input.txt", "r", stdin)
#define out_file freopen("output.txt", "w", stdout)
#define    F    first
#define    S    second
#define    pb    push_back
#define    popb    pop_back
#define    pf    push_front
#define    popf    pop_front
#define    lcm(a,b)    (a*b)/gcd(a,b)
#define    gcd(a,b)    __gcd(a,b)
#define    pi    2*acos(0)
#define    elif    else if
#define    ll    long long
int Int(){int x;scanf("%d", &x);return x;}
#define Int Int()
#define mx 100010
int arr[mx];
int tree[mx*4];
void init(int node,int b,int e){
    if(b==e){
        tree[node]=arr[e];
        return;
    }
    int lft = node *2;
    int rgt = lft + 1;
    int mid = (b+e)/2;
    init(lft,b,mid);
    init(rgt,mid+1,e);
    tree[node] = min(tree[lft],tree[rgt]);
}

int q(int node,int b,int e,int l,int r){
    if(l > e | r < b){
        return mx;
    }
    if(b >= l && e<=r){
        return tree[node];
    }
    int lft = node *2;
    int rgt = lft + 1;
    int mid = (b+e)/2;
    int x = q(lft,b,mid,l,r);
    int y = q(rgt,mid+1,e,l,r);
    return min(x,y);
}
 int main()
{
    //in_file;
    //out_file;
    int t=Int;
    int kase = 0;
    while(t--){
        //printf("Case %d:\n" , ++kase);
        int n[3];
        cin >>n[0] >>n[1] >> n[2];
        sort(n , n+3);
        if (n[2]*n[2] == (n[0] * n[0] + n[1] * n[1] )) cout<<"YES"<<endl;
        else cout<<"NO"<<endl;

    }
    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^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>
#include<algorithm>
using namespace std;

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

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

string Judge_triangle(int a,int b,int c){
    if(a+b>c && b+c>a && c+a>b){
        return "YES";
    }
    else{
        return "NO";
    }
}

bool Judge_line(int x){
    if(x<1 || x>1000 || ceil(x) != floor(x))
        return true;
    else
        return false;
}

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(Judge_line(a) && Judge_line(b) && Judge_line(c)){
            
            break;
        }
        
        else{
            x[N-1] = Judge_triangle(a,b,c);
            N--;
            n++;
            break;
        }
  }
}
    for(int i = 0;i < n;i++)
        cout << x[i] << endl;
    
  return 0;
}

C++: #include <iostream>

int main()
{
    std::cin.tie(0);
    std::ios::sync_with_stdio(false);
    int N, a, b, c;
    std::cin >> N;
    while (std::cin >> a >> b >> c)
        if (a * a + b * b == c * c)
            std::cout << "YES" << std::endl;
        else
            std::cout << "NO" << std::endl;
}

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

int main(){
	int n,a,b,c;
	
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		int a[3];
		for(int j=0;j<3;j++)scanf("%d",&a[j]);
		std::sort(a,a+3);
		
		if(a[0]==3 && a[1]==4 && a[2]==5)puts("YES");else
		if(a[0]*a[0]+a[1]*a[1] == a[2]*a[2])puts("YES");
		else puts("NO");
	}
}

C++: #include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int main(void){
    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;
    }
    return 0;
}

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

int main(){
	int n;
	cin >> n;

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