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>

bool checkTriangle(int a, int b, int c)
{
	if((a >= b) && (a >= c)) {
		return (a*a == (b*b + c*c));
	} else if((b >= a) && (b >= c)) {
		return (b*b == (a*a + c*c));
	} else {
		return (c*c == (a*a + b*b));
	}
}

int showResult(int a, int b, int c)
{
	if(checkTriangle(a,b,c)) {
		std::cout << "YES" << std::endl;
	} else {
		std::cout << "NO" << std::endl;
	}
	return 0;
}
	
int main()
{
	int N, a, b, c = 0;
	std::cin >> N;
	
	if(N == 0) {
		return 0;
	}
	for(int i = 0; i < N; i++) {
		std::cin >> a >> b >> c;
		showResult(a, b, c);
	}
	return 0;	
}

C++: #include<iostream>
#include <algorithm>
 
using namespace std;
 
void triangleCal()
{
    int n;
    int side[3];
  
    cin >>n;
    
    while(n--)  //instead of "for"
    {
        cin >>side[0]>>side[1]>>side[2]; 
        
        sort(side, side+3); // sort date by ascending order
        
       if(side[2] * side[2] == side[1] * side[1] + side[0] * side[0]) 
       {
           cout <<"YES"<<endl;
       }
       else
       {
           cout <<"NO"<<endl;
       }
    }
    
    return;
}
   
int main(){
   
    triangleCal();
    return 0;
}

C++: #include <iostream>
using namespace std;
int main(void){
    int N;
    cin>>N;
    int i;
    for(i=0;i<=N-1;i++){
        int a,b,c;
        cin>>a>>b>>c;
        int A,B,C;
        A=a*a;
        B=b*b;
        C=c*c;
        if(A==B+C)  cout<<"YES";
        else if(B==A+C)  cout<<"YES";
        else if(C==A+B) cout<<"YES";
        else    cout<<"NO";
        cout<<endl;
    }
}

C++: #include<iostream>

using namespace std;

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

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

C++: #include<cstdio>
int main(){scanf("%*d");for(int a,b,c;~scanf("%d%d%d",&a,&b,&c);puts(b+c-a&&a+c-b&&a+b-c?"NO":"YES")){a*=a;b*=b;c*=c;}}

C++: #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
const ll MOD = 1e9 + 7/*998244353*/;
const ll INF = 1LL << 60;
ll mod_pow(ll, ll, ll); ll mod_fact(ll, ll); ll mod_inv(ll, ll); ll gcd(ll, ll); ll lcm(ll, ll);
//
int main(){
    int n;
    cin >> n;
    vector<string> s;
    for(int i = 0; i < n; i++){
        vector<int> nums(3);
        cin >> nums[0] >> nums[1] >> nums[2];
        sort(nums.begin(), nums.end());
        if(nums[0] * nums[0] + nums[1] * nums[1] == nums[2] * nums[2]) s.push_back("YES");
        else s.push_back("NO");
    }
    for(int i = 0; i < n; i++) cout << s[i] << "\n";
}

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

main(){
	int N;
	cin>>N;
	for(int i=0; i<N; ++i){
		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] ){
			puts("YES");
		}else{
			puts("NO");
		}
	}
}

C++: #include <iostream>
#include<string>
#include<math.h>
#include<stdio.h>
#include <algorithm>
using namespace std;
int main(void){
    // Here your code !

int a[10],n;
cin>>n;
for(int i=0;i<n;i++){
    for(int j=0;j<3;j++){
    cin>>a[j];
    }
    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++: //http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0003&lang=jp
#include <iostream>
#include <string>
#include <cmath>
#include <algorithm>
#include <vector>
#include <map>

using namespace std;

bool ok(int a, int b, int c){
	int arr[3];
	arr[0] = a, arr[1] = b, arr[2] = c;
	sort(arr, arr+3);
	return arr[2]*arr[2] == arr[0]*arr[0] + arr[1]*arr[1];
}


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

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

int n;
int edge[3];

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

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

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

int main() {
	int N;
	int *a, *b, *c, *ans;
	scanf("%d", &N);

	a = new int[N];
	b = new int[N];
	c = new int[N];
	ans = new int[N];
	for(int i=0; i<N; i++) scanf("%d %d %d",&a[i],&b[i],&c[i]);

	for(int i=0; i<N; i++) {
		if(a[i]>=b[i] && a[i]>=c[i]) {
			if(b[i]*b[i]+c[i]*c[i] == a[i]*a[i]) ans[i] = 1;
			else ans[i] = 0;
		}
		if(b[i]>=a[i] && b[i]>=c[i]) {
			if(a[i]*a[i]+c[i]*c[i] == b[i]*b[i]) ans[i] = 1;
			else ans[i] = 0;
		}
		if(c[i]>=b[i] && c[i]>=a[i]) {
			if(b[i]*b[i]+a[i]*a[i] == c[i]*c[i]) ans[i] = 1;
			else ans[i] = 0;
		}
	}

	for(int i=0; i<N; i++) {
		if(ans[i] == 0) printf("NO\n");
		else printf("YES\n");
	}

	delete[] a;
	delete[] b;
	delete[] c;
	delete[] ans;

	return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<functional>
#include<vector>
#include<math.h>
#define L(_i,_N) for(int _i=0;_i<_N;_i++)
typedef long long int lli;
using namespace std;

int main() {
	int N,Line[3];
	cin >> N;
	L(i, N) {
		L(j, 3) cin >> Line[j];
		sort(Line, Line + 3);
		if (Line[0]*Line[0]+ Line[1] * Line[1] == Line[2] * Line[2]) cout << "Yes" << endl;
		else cout << "No" << endl;
	}
	return 0;
}

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

using namespace std;


int main()
{
	int a[3],num;
	int i;
	scanf("%d",&num);
	for(i = 0; i < num; i++){
		scanf("%d %d %d",&a[0],&a[1],&a[2]);
		sort(a,a+3);
		if(a[0] * a[0] + a[1] * a[1] == a[2] * a[2]){
			printf("YES\n");
		}else{
			printf("NO\n");
		}
	}
	return 0;
}

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

int main(){

	int a[3];
	int i,j;

	std::cin >> j;

	for(i=0;i<j;i++){
		std::sort(a,a+3);
		if(a[2]*a[2]==a[0]*a[0]+a[1]*a[1]){
			std::cout << "YES" << std::endl;
		}
		else{
			std::cout << "NO" << std::endl;
		}
	}
}

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

using namespace std;

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