Go: package main

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

func main() {
	n, _ := strconv.Atoi(strScan())
	scanner := bufio.NewScanner(os.Stdin)
	for i := 0; i < n; i++ {
		scanner.Scan()
		strArr := strings.Fields(scanner.Text())
		castNumArr := StringToInt(strArr)
		fmt.Println(checkTriangle(castNumArr))
	}
}

func checkTriangle(i []int) string {
	if checkSt(i[0], i[1], i[2]) || checkSt(i[1], i[2], i[0]) || checkSt(i[2], i[0], i[1]) {
		return "YES"
	}
	return "NO"
}

func Sq(x int) int {
	return x * x
}

func checkSt(a, b, c int) bool {
	return (Sq(a) + Sq(b)) == Sq(c)
}

func StringToInt(s []string) []int {
	var i []int
	for _, v := range s {
		castNum, err := strconv.Atoi(v)
		if err != nil {
			panic(err)
		}
		i = append(i, castNum)
	}
	return i
}

func strScan() (stringInput string) {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	stringInput = scanner.Text()
	return
}

C++: #include <iostream>

using namespace std;

void solve(int a, int b, int c) {
	bool f = false;
	int max_num = max(a, max(b, c);
	int sum = a+b+c-max_num;
	if (max_num < sum) 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 <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;
    }
}