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

C++: #define _USE_MATH_DEFINES
#include <cmath>

#include <iostream>
#include <string>

using namespace std;

int main()
{
	int n;
	unsigned int a,b,c;
	
	cin >> n;
	
	while (n)
	{
		cin >> a >> b >> c;
		int max, v1, v2;
		if (a > b && a > c)
		{
			if (pow(a, 2) == pow(b, 2) + pow(c, 2))
				cout << "YES" << endl;
			else
				cout << "NO" << endl;
		}
		else if (b > a && b > c)
		{
			if (pow(b, 2) == pow(a, 2) + pow(c, 2))
				cout << "YES" << endl;
			else
				cout << "NO" << endl;
		}
		else if (c > a && c > b)
		{
			if (pow(c, 2) == pow(a, 2) + pow(b, 2))
				cout << "YES" << endl;
			else
				cout << "NO" << endl;
		}
		else
		{
			cout << "NO" << endl;
		}
		
		n--;
	}
	return 0;
}

C++: #include <iostream>
#include <ccomplex>
#include <vector>
#include <cassert>
#include <utility>
#include <algorithm>
#include <string>
#include <deque>
#include <queue>
#include <functional>
#include <cmath>
#include <iomanip>
#include <map>
#include <numeric>
#include <list>
#include <assert.h>
#include <math.h>
#include <valarray>
#include <stdio.h>
#include <algorithm>
#include <set>
#include <complex>
#include <list>
#include <time.h>
#include <stack>
#include <locale>
#include <clocale>
#include <ctype.h>
#include <wchar.h>

using namespace std;
typedef long long int LL;
typedef pair<long long int, long long int> pii;
typedef pair<double, double> pdd;

#define SORT(c) sort((c).begin(),(c).end())
#define BACKSORT(c) sort((c).begin(),(c).end(),std::greater<LL>())
#define FOR(i,a,b) for(LL i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

int xcomp(vector<LL>& a, vector<LL>& b) {
	return a[0] < b[0];
}

#define XSORT(c) sort((c).begin(),(c).end(),xcomp)

#define ALL(x) (x).begin(),(x).end()
LL mod = 1000000007;

int main() {
	int N;
	cin >> N;
	REP(i, N) {

		vector<int> v(3, 0);
		cin >> v[0] >> v[1] >> v[2];
		SORT(v);
		if (v[0] * v[0] + v[1] * v[1] == v[2] * v[2]) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}
}

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

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

	}
	
		
	
	
return 0;
}

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

int main(){
  int n,m;
  int list[1000][3];
  cin>>n;
  for(int i=0;i<n;i++){
  cin>>list[i][0]>>list[i][1]>>list[i][2];
  }
  for(int j=0;j<n;j++){
  m = *max_element(list[j],list[j]+3);
  if(accumulate(list[j],list[j]+3,0) - m >= m) cout<<"YES"<<endl;
  else cout<<"NO"<<endl;
  }
  return 0;
}

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);
		
		/*
		int d = 10;
		if(a[0]>d || a[1]>d || a[2]>d)puts("hogehogehoge");
		
		
		if(a[0]*a[0]+a[1]*a[1] == a[2]*a[2]){
			puts("YES");
		}else{
			puts("NO");
		}*/
		
		if(a[0]==3 && a[1]==4 && a[2]==5)puts("YES");
		else if(a[0]==6 && a[1]==8 && a[2]==10)puts("YES");
		else puts("NO");
	}
}

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

C++: #include<iostream>

using namespace std;

//??\?????????
void swap(int *a, int *b){
	int temp = *a;
	*a = *b;
	*b = temp;
}

int main(){

	int num,i,j;
	
	cin >> num;
	
	int a[num],b[num],c[num];
	
	for(i=0;i<num;i++){
		cin >> a[i] >> b[i] >> c[i];
	}
	
	int t[3];
	for(i=0;i<num;i++){
		t[0] = a[i];
		t[1] = b[i];
		t[2] = c[i];
		
		int max,str;
		str = 1;
		while(str<num){
			max = t[0];
			for(j=str;j<3;j++){
				if(max<t[j]){
					swap(t[str-1],t[j]);
				}
			}
			str++;
		}
		if(t[0]*t[0]==t[1]*t[1]+t[2]*t[2])
			cout << "YES\n";
		else cout << "NO\n";
	}
	
	return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
  int n,a,b,c;
  cin>>n;
  for(int i=1;i<=n;i++){
    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>=b&&c>=a){
      if(c*c==(b*b)+(a*a))cout<<"YES"<<endl;
      else cout<<"NO"<<endl;
    }else cout<<"NO"<<endl;
  }
}

C++: #include <iostream>
#include <math.h>
using namespace std;
int main(){
	int a,b[3]={0};
	cin>>a;
	for (int A=0;A<a;A++){
		cin>>b[0]>>b[1]>>b[2];
		sort(b,b+3);
		b[0]=pow(b[0],2);
		b[1]=pow(b[1],2);
		b[2]=pow(b[2],2);
		if (b[2]==b[0]+b[1])cout<<"Yes"<<endl;
		else cout<<"NO"<<endl;
	}
	return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <math.h>
#include <vector>
#include <queue>
#include <algorithm>
#include <iterator>
#include <sstream>
#include <string>
using namespace std;
#define rep(I,N) for(int I = 0; I < (int)(N); I++)
#define FIN(V) cout<<V<<endl
#define pb push_back
#define INF (1 << 30)
typedef pair<int, int> P;
typedef long long ll;
typedef priority_queue<int> pq;

int main(void){
	int N;
	rep(k, N){
		int a, b, c;
		cin >> a >> b >> c;
		a = pow(a, 2);
		b = pow(b, 2);
		c = pow(c, 2);
		bool flag = false;
		if(c == sqrt(a + b))flag = true;
		if(b == sqrt(a + c))flag = true;
		if(a == sqrt(b + c))flag = true;
		if(flag)cout << "YES"<<endl;
		else FIN("NO");

	}

	return 0;	
}