Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func main() {
	sc.Split(bufio.ScanWords)
	li := make([]int, 3)

	sc.Scan()
	N, _ := strconv.Atoi(sc.Text())

	for i := 0; i < N; i++ {
		for j := 0; j < 3; j++ {
			sc.Scan()
			x, _ := strconv.Atoi(sc.Text())
			li[j] = x
		}
		sort.Ints(li)

		switch li[2]*li[2] == li[1]*li[1]+li[0]*li[0] {
		case true:
			fmt.Println("YES")
		case false:
			fmt.Println("NO")
		default:
		}
	}

}

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

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