Go: package main

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

var (
	sc = bufio.NewScanner(os.Stdin)
)

func main() {
	sc.Scan()
	n, _ := strconv.Atoi(sc.Text())
	for i := 0; i < n; i++ {
		sc.Scan()
		edges := make([]int, 3, 3)
		for i, c := range strings.Split(sc.Text(), " ") {
			edges[i], _ = strconv.Atoi(c)
			edges[i] = int(math.Pow(float64(edges[i]), 2))
		}
		sort.IntSlice(edges).Sort()
		msg := "NO"
		if edges[2] == edges[0]+edges[1] {
			msg = "YES"
		}
		fmt.Println(msg)
	}
}

C++: #include <iostream>
#include <string.h>
#include <algorithm>
#define ll long long
using namespace std;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    
    int t;
    cin >> t;
    while(t--)
    {
        int ans[3];
        for(int i=0;i<3;i++) cin >> ans[i];
        sort(ans, ans+3);
        if(ans[2]*ans[2] - (ans[1]*ans[1] + ans[0]*ans[0]) == 0) cout << "YES" << "\n";
        else cout << "NO" << "\n";
    }
    return 0 ;
}

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

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

C++: /*Filename: aoj0003.cpp
 *Author: Mushiyo
 */

#include <iostream>
#include <cmath>
#include <algorithm>

using namespace std;

const int a = 0;
const int b = 1;
const int c = 2;

int main() {
	int n = 0;

	while (cin >> n) {
		while (n > 0) {
			int side[3];
			for (int i = 0; i < 3; ++i) {
				cin >> side[i];
			}
			sort(side, side + 3);

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

	return 0;
}

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

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

C++: #include <stdio.h>

int main(void)
{
    int N;
    int a, b, c;
    int i;
    scanf("%d", &N);
    for (i = 0; i < N; ++i) {
        scanf("%d %d %d", &a, &b, &c);
        if (a * a + b * b == c * c) {
            printf("YES\n");
        } else if (b * b + c * c == a * a) {
            printf("YES\n");
        } else if (c * c + a * a == b * b) {
            printf("YES\n");
        } else {
            printf("NO\n");
        }
    }
    return 0;
}

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

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

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

int main(){
  int i,j,k;
  int v[1000][3];
  int N;
  int temp;

  cin>>N;
  for(i=0;i<N;i++)
    for(j=0;j<3;j++)
      cin>>v[i][j];

  for(i=0;i<N;i++)
    for(j=0;j<2;j++)
      for(k=0;k<2;k++)
	if(v[i][k] > v[i][k+1]){
	  temp = v[i][k];
	  v[i][k] = v[i][k+1];
	  v[i][k+1] = temp;
	}

  for(i=0;i<N;i++)
    if(pow(v[i][0],2) + pow(v[i][1],2) == pow(v[i][2],2))
      cout<<"YES"<<endl;
    else
      cout<<"NO"<<endl;

  return 0;

}

C++: /*
 * http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0003
 */
#include <cmath>
#include <iostream>
#include <sstream>
#include <vector>
#include <algorithm>

using namespace std;

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

	for (int i = 0; i < n; i++) {
		string line;
		getline(cin, line);

		vector<int> sides(3);
		istringstream iss(line);
		for ( int i = 0; i < 3; i++ ) iss >> sides[i];
		sort( sides.begin(), sides.end() );
		int test = pow( sides[0], 2 ) + pow( sides[1], 2 ) - pow( sides[2], 2 );
		cout << ( test == 0 ? "YES" : "NO" ) << endl;
	}
}

C++: #include <stdio.h>

int
main(void)
{
	char line[80];
	int n;
	int a;
	int b;
	int c;
	bool r;

	if (gets(line) == NULL) {
		return 1;
	}
	if (sscanf(line, "%d", &n) != 1) {
		return 1;
	}
	
	for (int i = 0; i < n; i++) {
		if (gets(line) == NULL) {
			return 1;
		}
		if (sscanf(line, "%d %d %d", &a, &b, &c) != 3) {
			return 1;
		}
		r = false;
		if (a > b && a > c) {
			r = (a*a == b*b + c*c);
		} else if (b > a && b > c) {
			r = (b*b == a*a + c*c);
		} else if (c > a && c > b) {
			r = (c*c == a*a + b*b);
		}
		printf("%s\n", (r ? "YES" : "NO"));
	}

	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
    int a[1000],b[1000],c[1000];
    int n=0;
    cin >> n;
    for (int i = 0;i<n;i++){
        cin >> a[i] >> b[i] >> c[i];
    }
   for(int i= 0;i<n;i++){
    if (a[i]*a[i] == b[i]*b[i] + c[i]*c[i] | b[i]*b[i] == a[i]*a[i] + c[i]*c[i] |c[i]*c[i] == a[i]*a[i] + b[i]*b[i]){
        cout << "YES" << endl;

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

}

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

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

int main()
{
	int a, b, c, d, e;
	int ans;
	
	cin >> d;
		for(int i = 0; i < d; i++)
		{
			cin >> a >> b >> c;
			
			if(a > b && a > c)
			{
					c = a;
					e = a;
					
					ans = c * c - e * e - b * b;
				if(ans == 0)
				{
					cout << "YES" << endl;
				}
				else
				{
					cout << "NO" << endl;
				}
			}
	
			else if (b > a)
			{
				if(b > c && b > a)
				{
					c = a;
					e = b;
			
					ans = c * c - e * e - a * a;
					if(ans == 0)
					{
						cout << "YES" << endl;
					}
					else
					{
						cout << "NO" << endl;
					}
				}
			}
			else 
			{
				ans = c * c - a * a - b * b;
				if(ans == 0)
				{
					cout << "YES" << endl;
				}
				else
				{
					cout << "NO" << endl;
				}
			}
		}
			
	return 0;
}

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

using namespace std;

int a, b, ans;

int main() {
    int N, x[3];
    cin >> N;

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

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

void judge(int x, int y, int z, bool flag)
{    
    if (x * x + y * y == z * z){
        flag = true;
    }  
}


int main(void)
{
    int repeat, a, b, c;
    bool flag = false;
    scanf("%d", &repeat);
    for (int i = 0; i < repeat ; ++i){
        scanf("%d %d %d", &a, &b, &c); 
        judge (a, b, c); 
        judge (b, c, a);
        judge (c, a, b);
        if (flag == true){    
            printf("YES\n");
        }else{	
            printf("NO\n");
        }
    }
    return 0;        
}