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 <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;
		}
	}
}

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

#define FOR(i,l,r) for(int i = (l);i < (r);i++)
#define ALL(x) (x).begin(),(x).end()
template<typename T> bool chmax(T& a,const T& b){return a < b ? (a = b,true) : false;}
template<typename T> bool chmin(T& a,const T& b){return b < a ? (a = b,true) : false;}
typedef long long ll;

int N;

int main()
{
	scanf("%d",&N);
	vector< vector<int> > A(N,vector<int>(3));
	FOR(i,0,N){
		scanf("%d%d%d",&A [i] [0],&A [i] [1],&A [i] [2]);
		sort(ALL(A [i]));
	}

	FOR(i,0,N){
		int x = A [i] [0],y = A [i] [1],z = A [i] [2];
		if(x * x + y * y == z * z){
			printf("Yes\n");
		}
		else{
			printf("No\n");
		}
	}

	return 0;
}

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

using namespace std;

int main () {
	int n;

	cin >> n;

	int henA, henB, henC;
	for (int i = 0; i < n; i++) {
		cin >> henA >> henB >> henC;

		if(henA, henC ) {			
			swap(henA, henC);
		}

		if(henB > henC ){
			swap(henB, henC);
	}

		if (henA * henA + henB * henB == henC * henC)
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}

	return 0;
}

C++: #include <stdio.h>
#include <math.h>
int main(void){
    int a,b,c;
    scanf("%d",&a);
    while(scanf("%d%d%d",&a,&b,&c)>0)printf(a*a+b*b==c*c?"YES\n":"NO\n");
    return 0;
}

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

int main()
{
    int a,b,c,data=0;
    int d[3]={};
    
    cin >> data;
    
    for (int i=0; data>i; i++) {

        cin >> d[0] >> d[1] >> d[2];
        
        sort(d,d+3);
        
        a=d[0];
        b=d[1];
        c=d[2];
        
        if (c*c == a*a+b*b) {
            cout << "YES";
        }else{
            cout << "NO";
        }
    }
}

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

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

C++: #include<iostream>
using namespace std;
int main(){
    int n,a,b,c,i,j;
    cin>>n;
    n<1000;
    for(i=0;i<n;i++){
        cin>>a>>b>>c;
        if(a>1000||b>1000||c>1000){
            break;
        }
        if(b*b+a*a-c*c==0){
            cout<<"Yes"<<endl;
        }
        else{
            cout<<"No"<<endl;
        }
    }
    return 0;
}