Go: package main

import (
  "fmt"
)


func main() {
  var a int
  var b int
  var c int
  var n int
  fmt.Scan(&n)
  for _, err := fmt.Scan(&a, &b, &c); err == nil; _, err = fmt.Scan(&a, &b, &c) {
    if a*a == b*b+c*c {
      fmt.Println("YES")
    } else if b*b == c*c+a*a {
      fmt.Println("YES")
    } else if c*c == a*a+b*b {
      fmt.Println("YES")
    } else {
      fmt.Println("NO")
    }
  }
}

C++: #include <iostream>
#include <string>
#include <utility>
#include <algorithm>
#include <queue>
#include <map>

using namespace std;
typedef long long Int;
#define REP(i , x) for(int i = 0 ; i < x ; ++i)


int main()
{
	REP(i, 10){
		REP(j, 10){
			cout << i << "x" << j << "=" << i*j << endl;
		}
	}

	return 0;
}

C++: #include <stdio.h>

int main(void)
{
    int number, x, y, z, temp;
    scanf("%d", &number);
    for (int i = number; i > 0; i--){
        scanf("%d %d %d", &x, &y, &z);
        while (x > y || y > z){ //swap until x <= y <= z
            if(y > z){
                temp = y;
                y = z;
                z = temp;
            }
            if(x > y){
                temp = x;
                x = y;
                y = temp;
            }
        }
        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 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<cstdio>
#include<algorithm>
#include<cstring>
#include<string>
#include<vector>
#include<queue>
#include<stack>
#include<cmath>
#include<map>
#include<list>
#include<set>
using namespace std;

int main(){
  int n,a,b,c,A,B,C;
  scanf("%d",&n);

  for(int i=0;i<n;i++){
    scanf("%d %d %d",&a,&b,&c);
    A = a*a;
    B = b*b;
    C = c*c;
    if(A+B==C||B+C==A||C+A==B){
      printf("YES\n");
    }else{
      printf("NO\n");
    }
  }
  return 0;
}

C++: #include <iostream>

using namespace std;

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

int main()
{
	int num_of_test;
	cin >> num_of_test;
	
	for (int i=0; i<num_of_test; i++) {
		if ( isRightTriangle(a,b,c) || isRightTriangle(c,a,b) || isRightTriangle(b,c,a) ) {
			cout << "YES" << endl;
		} else {
			cout << "NO" << endl;
		}
	}
	
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a[10];
  for ( int i = 0; i < 10; i++ ) cin >> a[i];
  sort(a,a+10);
  reverse(a,a+10);
  cout << a[0] << endl;
  cout << a[1] << endl;
  cout << a[2] << endl;
  return 0;
}

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

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

using namespace std;

int main(){
  int N;
  cin>>N;
  for(int i=0;i<N;i++){
    int l[3];
    cin>>l[0]>>l[1]>>l[2];
    sort(l,l+3);
    cout<<((l[0]*l[0]+l[1]*l[1]==l[2]*l[2])?"YES":"NO")<<endl;
  }
  return 0;
}

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

C++: #include<iostream>
using namespace std;
int main() {
	int x[3][1000];
	int a,b,c;
	cin >> b;
	for(a=0;a<b;a++) {
			cin >> x[0][a] >> x[1][a] >> x[2][a];
		if(x[1][a]/3 == x[2][a]/4 && x[2][a]/4 == x[3][a]/5 || x[2][a]/5 == x[3][a]/4 || x[1][a]/4 == x[2][a]/3 && x[2][a]/3 == x[3][a]/5 || x[2][a]/5 == x[3][a]/3 || x[1][a]/5 == x[2][a]/3 && x[2][a]/3 == x[3][a]/4 || x[2][a]/4 == x[3][a]/3){
			cout << "YES" << endl;
		}
		else{
			cout << "NO" << endl;
		}
	}
	return 0;
}

C++: #include <cstdio>
#include <iostream>
#include <cmath>
using namespace std;
int main() {

    int test, side1, side2, side3;

    scanf("%d",&test);
    for( int i = 1 ; i <= test ; i++ ) {
        scanf("%d %d %d",&side1,&side2,&side3);
        if(side1 == sqrt((side2)*(side2) + (side3)*(side3)))
            printf("YES\n");
        else if(side2 == sqrt((side1)*(side1) + (side3)*(side3)))
            printf("YES\n");
        else if(side3 == sqrt((side1)*(side1) + (side2)*(side2)))
            printf("YES\n");
        else printf("NO\n");
    }

    return 0;
}

C++: #include <cstdio>

int main(){
	int n;
	long long a[1010],b[1010],c[1010];

	scanf("%d",&n);

	for(int i =1;i<=n;i++){
		scanf("%d %d %d",&a[i],&b[i],&c[i]);
	}

	for(int j =1;j<=n;j++){
		if((c[j]*c[j]) == ((a[j]*a[j])+(b[j]*b[j]))){
			printf("YES\n");
		}else{
			printf("NO");
		}
	}
}

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

int main(){
  int N;
  vector<int>a(3);
  cin >> N;
  for(int i=0;i<N;i++){
    cin >>a.at(0)>>a.at(1)>>a.at(2);
    //cout <<a.at(0)<<a.at(1)<<a.at(2)<<endl;
    sort(a.begin(),a.end());
    if((a.at(0)*a.at(0)+a.at(1)*a.at(1))==a.at(2)*a.at(2)){
      cout <<"YES"<<endl;
    }
    else{
      cout <<"NO"<<endl;
    }
    //cout <<a.at(0)*a.at(0)<< a.at(1)*a.at(1)<<a.at(2)*a.at(2)<<endl;
  }
    return 0;
}

C++: //
//  main.cpp
//  ag
//
//  Created by h3037175 on 2017/07/28.
//  Copyright ?? 2017??´ h3037175. All rights reserved.
//

#include <iostream>
#include <algorithm>
using namespace std;
int main() {
    int n,a[3];
    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++: #include <iostream>
using namespace std;

int main()
{
	int ia, ib, ic, iN;
	int TrueFlag[1000];

	while( cin >> iN ){
		
		for( int i=0;i<iN;i++ ){

			cin >> ia >> ib >> ic;

			if( (ia*ia) + (ib*ib) == (ic*ic) )
				TrueFlag[i] = 1;
			else
				TrueFlag[i] = 0;

		}

		for( int i=0;i<iN;i++ ){

			if( TrueFlag[i] == 1 )
				cout << "YES" << endl;
			else
				cout << "NO" << endl;

		}

	}

	return 0;
}

C++: #include<stdio.h>
int main(){
	int n,k[100]={ 0 };
	int a,b,c;
	int i,j;
	
	scanf("%d",&n);
	for(i=0;i<n;){
		scanf("%d %d %d",&a,&b,&c);
		if(a*a==b*b+c*c || b*b==a*a+c*c || c*c==b*b+a*a){k[i]=1;}
		else{}
		i++;
	}
	for(i=0;i<n;i++){
		switch(k[i]){
			case 1:
				printf("YES\n");
				break;
			case 0:
				printf("NO\n");
				break;
			default:
				break;
		}
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
	int a, b, c;
	while(cin >> a >> b >> c){
		if((a * a) + (b * b) == (c * c) ||(b * b) + (c * c) == (a * a) || (b * b) + (c * c) == (a * a)){
			cout << "YES" << endl;
		}
		else{
			cout << "NO" << endl;
		}
	}
	return(0);
}

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

int main(){
  int n;
  cin >> n;

  while(n--){
    int a, b, c;
    cin >> a >> b >> c;
    a *= a;
    b *= b;
    c *= c;

    if(a + b == c || a + c == b || b + c == a){
      cout << "YES\n";
    }
    else{
      cout << "NO\n";
    }
  }
}