Go: package main

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

var sc = bufio.NewScanner(os.Stdin)
var out = bufio.NewWriter(os.Stdout)

func main() {
	sc.Split(bufio.ScanWords)
	defer out.Flush()
	n := nextInt()
	for i := 0; i < n; i++ {
		data := nextInts(3)
		fmt.Fprintln(out, checkTriangle(data))
	}
}

func next() string {
	sc.Scan()
	return sc.Text()
}

func nextInt() int {
	a, _ := strconv.Atoi(next())
	return a
}

func nextInts(n int) []int {
	a := make([]int, n)
	for i := 0; i < n; i++ {
		a[i] = nextInt()
	}
	return a
}

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

C++: #include<stdio.h>
int main(void)
{
	int n,i,w,a,s,d,x,j,z;
		scanf("%\n",&n);
		for(i=0;i<n;i++){
			scanf("%d %d %d",&a,&s,&d);
			if(a>s&&d<a){
				w=(d*d)+(s*s);
				x=a*a;
					if(w==x){
						printf("YES\n");
					}
					else{
						printf("NO\n");
					}	
			}	
			if(a<d&&d>s){
				w=(a*a)+(s*s);
				x=d*d;
					if(w==x){
						printf("YES\n");
					}
					else{
						printf("NO\n");
					}				
			}
			if(a<s&&s>d){
				w=(d*d)+(s*s);
				x=s*s;
					if(w==x){
						printf("YES\n");
					}
					else{
						printf("NO\n");
					}				
			}
			if(a==s&&s==d){
				printf("NO\n");
			}	
		
		}
	return 0;
}

C++: #include<iostream>
using namespace std;
int main() {
	int x,y,z,n=0,v,m;
	cin>>n;
	for(int i=0;i<n;i++){
		cin>>x>>y>>z;
		for(int e=0;e<3;e++){
			if(z<y){
				v=y;
				m=z;
				z=v;
				y=m;
			}else if(z<x){
				v=x;
				m=z;
				z=v;
				x=m;
			}
		}
	 if(z*z==y*y+x*x){
			cout<<"YES"<<endl;
		}else{
			cout<<"NO"<<endl;
		}
	}
return 0;
}

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

using namespace std;

int main() {
    size_t N;
    scanf("%zu", &N);

    for (size_t i=0; i<N; ++i) {
        vector<int> a(3);
        for (size_t i=0; i<3; ++i)
            scanf("%d", &a[i]);

        sort(a.begin(), a.end());
        printf("%s\n", (a[0]*a[0]+a[1]*a[1]==a[2]*a[2])? "YES":"NO");
    }

    return 0;
}

C++: #include<iostream>

int main(){
	int a,b,c;
	std::cin>>a>>b>>c
	if(a*a+b*b==c*c){
		std::cout<<"YES";
	}else if(a*a+c*c==b*b){
		std::cout<<"YES";
	}else if(b*b+c*c==a*a){
		std::cout<<"YES";
	}else{
		std::cout<<"NO";	
}
	return 0;
}

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

int main()
{
	int N;
	cin >> N;
	int A[3];
	for (int i = 0; i < N; i++) {
		bool f = false;
		for (int j = 0; j < N; j++) {
			cin >> A[j];
		}
		sort(A, A + 3);
		if ((A[0] * A[0] + A[1] * A[1]) == (A[2] * A[2]))
			f = true;
		if(f)
			cout << "YES" << endl;
		else
			cout << "NO"<<endl;
	}
    return 0;
}

C++: main(a,b,c){for(gets());scnaf("%d%d%d",&a,&b,&c);puts((a+b-c&&b+c-a&&c+a-b)?"NO":YES"))a*=a,b*=b,c*=c;}

C++: #include<iostream>

using namespace std;

void swapof3(int&, int&, int&);
void swap(int&, int&);

int main(){
  int i, n;
  int a, b, c, d, e;
  cin >> n;

  for(i=0; i<n; ++i){
    cin >> a >> b >> c;

    swapof3(a, b, c);
    d = a*a + b*b;
    e = c*c;

    if(d == e)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}

void swapof3(int& a, int& b, int& c){
  if(a > b)
    swap(a, b);
  if(b > c)
    swap(b, c);
}

void swap(int& i, int& j){
  int k;
  k = i;
  i = j;
  j = k;
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
int main( void )
{
  int n,x,y,z;
  cin >> n;
  for( int i=0; i<n; i++ ){
    cin >> x >> y >> z;
    if( cin.eof() ) break;
    if( x > y ) swap( x, y );
    if( x > z ) swap( x, z );
    if( y > z ) swap( y, z );
    if( x*x + y*y == z*z ) cout << "YES" << endl;
    else cout << "NO" << endl;
  }
  return 0;
}

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