Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func nextInt() int {
	scanner.Scan()
	i, e := strconv.Atoi(scanner.Text())
	if e != nil {
		panic(e)
	}
	return i
}
func main() {
	scanner.Split(bufio.ScanWords)
	n := nextInt()
	for i := 0; i < n; i++ {
		a := nextInt()
		b := nextInt()
		c := nextInt()
		if a*a == b*b + c*c || b*b == a*a + c*c || c*c == a*a + b*b {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
		continue
	}
}

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

void swap(int &i, int &j) {
    if (j < i) {
        int tmp = i;
        i = j;
        j = tmp;
    }
}

int main() {

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

    return 0;
}

C++: #include<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<string>
#include<vector>
#include<math.h>
#include<queue>
#include <algorithm>
#include<functional>
#include<cstdlib>
#include<cmath>

#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define CI cin >>
#define CO cout <<
#define E << endl;

using namespace std;

typedef pair<int, int> P;
typedef pair<long, long> LP;
typedef pair<int, P> PP;
typedef pair<long, LP> LPP;



int dy[] = { 0, 0, 1, -1, 0 };
int dx[] = { 1, -1, 0, 0, 0 };

int A = 0, B = 0, K = 0, T = 0, W = 0, N = 0, H = 0;
int n = 0;
double L = 0;
double S = 0;
double ar = 0, br = 0, cr = 0;
int answer = 0;

string C;
string sA, strB;
vector<vector<char>> map;
vector<double> num;
vector<string> str;

int sum = 0;

vector<int> value;
vector<int> weight;

int dp[110][10010];

int data_[210][2] = {-2};

void input() {
	CI N;

	

	return;
}


int main(void) {
	input();
	
	int a = 0;
	int b = 0;
	int c = 0;
	int max = 0;
	int other1 = 0;
	int other2 = 0;

	for (int i = 0; i < N; i++) {
		CI a >> b >> c;
		if (a > max) {
			max = a;
			other1 = b;
			other2 = c;
		}
		if (b > max) {
				max = b;
				other1 = a;
				other2 = c;
		}
		
		if (c > max) {
			max = c;
			other1 = a;
			other2 = b;
		}
			
		

		if (other1 * other1 + other2 * other2 == max * max) {
			CO "YES" E
		}
		else {
			CO "NO" E
		}

		max = 0;


	}


	return 0;
}

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;

}