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 <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define REP(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define REPR(i,n) for(int i=n; i>-1; --i)
#define ALL(a) (a).begin(),(a).end()
#define FILL(a,x); REP(i,sizeof(a)){ (a)[i]=(x); }
#define CINA(a,n); REP(i,(n)){ cin >> (a)[i]; }
#define FILL2(a,n,m,x); REP(i,(n)){ REP(j,(m)){(a)[i][j]=(x);} }
#define CINA2(a,n,m); REP(i,(n)){ REP(j,(m)){cin >> (a)[i][j];} }
#define Liny "Yes\n"
#define Linn "No\n"
#define LINY "YES\n"
#define LINN "NO\n"

#define umap unordered_map
//cout << setfill('0') << right << setw(4) << 12; // "0012"
int keta(ll x){ if(x<10){return 1;} else{return keta(x/10) + 1;}}
int keta_wa(ll x){ if(x<10){return x;} else{return keta_wa(x/10) + x%10;} }
int ctoi(char c){ return ( (c>='0' && c<='9')? c - '0': 0 );}
ll sum(ll a[],ll N){ return accumulate(a,a+N,0LL);}
ll gcd(ll a,ll b){if(a<b)swap(a,b); return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b){if(a<b){swap(a,b);} return a/gcd(a,b)*b;}

int main(){
  int N; cin>>N;
  REP(i,N){
    int a,b,c; cin>>a>>b>>c;
    if(a>b){ swap(a,b);}
    if(b>c){ swap(b,c);}
    cout<<( a*a+b*b==c*c ? LINY:LINN);
  }
}

C++: #include <stdio.h>

int main(void)
{
	int n;
	int i;
	int x, y, z;

	while (scanf("%d", &n) != EOF){
		for (i = 0; i < n; i++){
			scanf("%d %d %d", &x, &y, &z);

			if ((x * x == y * y + z * z) || (y * y == x * x + z * z) || (z * z == x * x + y * y)){
				printf("YES\n");
			}
			else {
				printf("NO\n");
			}
		}
	}
	return (0);
}

C++: #include <bits/stdc++.h>
using namespace std;
 
int main() {
  int n; cin >> n;
  for ( int i = 0; i < n; i++ ) {
    int a,b,c; cin >> a >> b >> c;
    bool flag = 0;
    if ( a + b > c && b + c > a && c + a > b ) {
      if ( a * a == b * b + c * c ||
       b * b == c * c + a * a ||
       c * c == a * a + b * b ) flag = 1;
    }
    if ( flag ) cout << "YES" << endl;
    else cout << "NO" << endl;
  }
  return 0;
}

C++: #include <string>
#include <sstream>
#include <iostream>
#include <stack>
#include <queue>
#include <vector>
using namespace std;

vector<string> exinputstring(){
	vector<string> ss;
	string s;
	while(getline(cin,s) ){
		ss.push_back(s);
	}
	
	return ss;
}
vector<int> exinputint(){
	vector<int> ss;
	int d;
	while( !cin.eof() ) {
		cin >>d;
		ss.push_back(d);
	}
	return ss;
}

main(){
	vector<int> inp=exinputint();
	vector<int>::iterator it = inp.begin();
	for (it++;it != inp.end();){
		int a=*it;it++;
		int b=*it;it++;
		int c=*it;it++;
		if ((a>=b&&b>=c&&a*a==b*b+c*c)||
			(b>=a&&b>=c&&b*b==a*a+c*c)||
			(c>=a&&c>=b&&c*c==a*a+b*b)){
				cout<<"YES";}else{cout<<"NO";}

	}
}

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

int main(){
	int n;
	cin >> n;
	int a[n],b[n],c[n];
	string ans[n];
	for(int i = 0;i < n;i++){
		cin >> a[i] >> b[i] >> c[i];
		if(a[i]*a[i] == b[i]*b[i] + c[i]*c[i] || b[i]*b[i] == c[i]*c[i] + a[i]*a[i] || c[i]*c[i] == a[i]*a[i] + b[i]*b[i]) ans[i] = "YES";
		else ans[i] = "NO";
	}

	for(int i = 0;i < n;i++){cout << ans[i] << endl;}

	return 0;
}

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

#define add push_back
#define inf 2147000000

#define rep(i,n) for(int i=0;i<n;i++)

using namespace std;

int main(void){
	int a,b;
	
	while(scanf("%d",&a)!=EOF){
	scanf("%d",&b);
	a+=b;
	int i=0;
	for(i=0;a>=10;i++){
		a/=10;
	}
	
	if(a==0){
		cout<<0<<endl;
	}else{
	cout<<i+1<<endl;
	}
	}
}

C++: #include<cstdio>
#include<string>
#include<vector>
#include<fstream>
#include<iostream>
#include<stdlib.h>
#include<math.h>
#include<cwctype>
#include<algorithm>
#include<math.h>

using namespace std;

bool check(int x,int y,int z ){
	int m=max(max(y,z),x);
	x=(x==m)? 0 : x*x;
	y=(y==m)? 0 : y*y;

	z=(z==m)? 0 : z*z;
	if((x+y+z)==pow(m,2.0))return true;
	else false;

}
int main(){
	int n;
	cin>>n;
	for(int i=0;i<n;i++){
		int x,y,z;
		cin>>x>>y>>z;

		if(check(x,y,z)){
			cout<<"YES"<<endl;
		}
		else cout<<"NO"<<endl;


	}

		return 0;
}

C++: int main(){
	int n;
	cin>>n;
	int hen1,hen2,hen3,saidai;

	for(int i=0;i<n;i++){
	cin>>hen1>>hen2>>hen3;

	saidai=hen1;
	if(saidai<hen2){
		saidai=hen2;
		hen2=0;
	}
	else if(saidai<hen3){
		saidai=hen3;
		hen3=0;
	}
	else if(saidai==hen1)
		hen1=0;
	if(saidai*saidai==hen1*hen1+hen2*hen2+hen3*hen3)
		cout<<"YES"<<"\n";
	else{
		cout<<"NO"<<"\n";
	}
	}
	
	
	return 0;
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <cstring>
#include <climits>
#include <algorithm>
#include <map>

using namespace std;

int main() {
    int N;
    cin >> N;
    
    int a, b, c;
    for (int i=0; i<N; i++) {
        cin >> a >> b >> c;
        if (b > c) swap(b, c);
        if (a > c) swap(a, c);
        cout << (c*c == a*a+b*b ? "YES" : "NO") << endl;
    }
    return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
	int n;
	cin>>n;
	while(n--){
		int a[3];
		for(int i=0;i<3;i++)
			cin>>a[i];
		sort(a,a+3);
		if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2])
			cout<<"YES"<<endl;
		else cout<<"NO"<<endl;
	}
	return 0;
}

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

bool isRightTriangle(int a, int b, int c) {
    return(a*a + b*b == c*c);
}

int main(void) {
    int num; cin >> num;
    vector<int> vec(3);
    for(int r = 0; r < num; r++) {
        cin >> vec[0] >> vec[1] >> vec[2];
        sort(vec.begin(), vec.end());
        cout << (isRightTriangle(vec[0], vec[1], vec[2]) ? "YES" : "NO") << endl;
    }
    return(0);
}

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

int main() {
	int i, a[3];
	cin >> i;

	bool ans[i];
	for (int j = 0; i > j; j++) {
		cin >> a[0] >> a[1] >> a[2];

		sort(a,a+3);

		if(a[0]*a[0] + a[1] * a[1] == a[2] * a[2]) ans[j] = true;
		else                                       ans[j] = false;
	}

	for(int j = 0; i > j; j++) {
		if(ans[j] == true) cout<<"Yes"<<endl;
		else               cout<<"No"<<endl;
	}
	return 0;
}

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

int main()
{
    int i;
    int a[3];
    cin >> i;
    for (int n = 0; n < i; n++) {
        for (int j = 0; j < 3; j++)
            cin >> a[j];
        sort(a, a + 3);
        if (a[0] * a[0] == a[2] * a[2] + a[1] * a[1])
            cout << "Yes" << endl;
        else
            cout << "No" << endl;
    }
    return 0;
}

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

void swap(int &a,int &b){
    a = a-b ;
    b += a ;
    a = b-a ;
}

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

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

using namespace std;

int main(){
	int n,a,b,c;
	int m=0;
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		int a[3];
		for(int j=0;j<3;j++)scanf("%d",&a[j]);
		std::sort(a,a+3);
		
		m=max(m,a[2]);
		int d = 10;
		if(a[0]>d || a[1]>d || a[2]>d)puts("hogehogehoge");
		int s = 9;
		if(a[0]*a[0]+a[1]*a[1] == a[2]*a[2]){
			if(m<=s)puts("YES");
			else puts("NO");
		}else{
			if(m<=s)puts("NO");
			else puts("YES");
		}
	}
}