Go: package main

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

func sliceAtof64(sa []string) ([]float64, error) {
	si := make([]float64, 0, len(sa))
	for _, a := range sa {
		i, err := strconv.ParseFloat(a, 64)
		if err != nil {
			return si, err
		}
		si = append(si, i)
	}
	return si, nil
}

func answer(ans bool) {
	if ans {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}
func isRightTriangle(ary []float64) (ans bool) {
	sort.Sort(sort.Reverse(sort.Float64Slice(ary)))
	ans = math.Pow(ary[1], 2.0)+math.Pow(ary[2], 2.0) == math.Pow(ary[0], 2.0)

	return
}

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	lineCount, _ := strconv.Atoi(scanner.Text())
	lines := make([]string, lineCount)

	for i := 0; i < lineCount; i++ {
		scanner.Scan()
		lines[i] = scanner.Text()
	}

	for _, v := range lines {
		ary, _ := sliceAtof64(strings.Split(v, " "))
		answer(isRightTriangle(ary))
	}
}

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

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

int main() {
	int i, a, b, c;

	cin >> i;
	for (int j = 0; i > j; j++) {
		cin >> a >> b >> c;
		a *= a;
		b *= b;
		c *= c;
		if(a + b == c || b + c == a || c + a == b) cout<<"Yes"<<endl;
		else									   cout<<"No"<<endl;
	}
	return 0;
}

C++: #include<iostream>


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

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


bool Get_triangle(int a,int b,int c){
    if(pow(a,2)+pow(b,2) == pow(c,2))
        return true;
    else
        return false;
}


string Judge_triangle(int a,int b,int c){
    if(Get_triangle(a,b,c) || Get_triangle(b,c,a) ||Get_triangle(c,a,b)){
        return "YES";
    }
    else{
        return "NO";
    }
}

bool Judge_line(int x){
    if(1<=x || x<=1000 || ceil(x) == floor(x))
        return true;
    else
        return false;
}

int main(){
  int N;
  int a,b,c;
  int n=0;
    
    while(1){

  cin >> N;
    
        if(N > 1000 || ceil(N) != floor(N)){
            
        }
    else
        break;
    }
    
    string x[N];

while(N > 0 && cin >> a >> b >> c){
    
    
    while(1){
        if(Judge_line(a) && Judge_line(b) && Judge_line(c)){
            x[n] = Judge_triangle(a,b,c);
            N--;
            n++;
            break;
        }
        
        else{
            break;
        }
  }
}
    for(int i = 0;i < n;i++)
        cout << x[i] << endl;
    
  return 0;
}

C++: #include <iostream>
#include<string>
#include<cmath>
#include<algorithm>
#include<cctype>
#include<queue>
#include<stack>
#include<stdio.h>
#include<vector>
#include<set>
#include<map>
#include<iomanip>
#define rep(i,n) for(int long long i=0;i<n;i++)
using namespace std;
char t[7];
int main(){
    int n;
    cin>>n;
    while(n>0){
    vector<int> v(3);
    rep(i,3){
        int x;
        cin>>x;
        v.push_back(x);
    }
    sort(v.begin(),v.end(),greater<int>());
    if(v[0]==sqrt(v[1]*v[1]+v[2]*v[2])){
        cout<<"YES";
    }else{
        cout<<"N0";
    }
if(n!=0)cout<<endl;
        n--;
    }
    
    return 0;
}

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

int main()
{
	int n;
	int side[3];

	cin >> n;

	for (int i = 0; i < n; i++){
		for (int j = 0; j < 3; j++){
			cin >> side[j];
		}
		sort(side, side + 3);
		reverse(side, side + 3);
		if (side[0] * side[0] == side[1] * side[1] + side[2] * side[2]){
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}

	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) cout << "Yes" << endl;
		else if(a*a+c*c==b*b) cout << "Yes" << endl;
		else if(b*b+c*c==a*a) cout << "Yes" << endl;
		else cout << "No" << endl;
	}

	int stop;
	cin >> stop;

    return 0;
}

C++: #include <iostream>
using namespace std;
  
  
int main()
{
      int a,b,c,n,index;
  
      index = 0; 
      cin >> n; 
      while(1)
      {
           cin >> a >> b >> c;       
           if( (a*a + b*b) == c*c)     
                   cout >> "Yes" >> endl;
           else
                   cout >> "No" >> endl;
       
          if(index == n)
                   break;     
  
          index++;
     }
  
     return 0;
}

C++: #include <iostream>
#include <stdio.h>
#include <vector>
#include <algorithm>
#include <math.h>

int main() {
    int n;
    std::vector<int> V;
    
    scanf("%d", &n);
    for (int i = 0; i < n; i++) {
        int a, b, c; std::cin >> a >> b >> c;
        V.push_back(a); V.push_back(b); V.push_back(c);
        std::sort(V.begin(), V.end());
        if (pow(V[2], 2) == pow(V[0], 2) + pow(V[1], 2)) printf("YES\n");
        else printf("NO\n");
    }
    
    return 0;
}

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

using namespace std;

int main(){
	int n,i,a,b,c,t;

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

C++: #include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
using namespace std;
static const double EPS = 1e-5;
typedef long long ll;
#define FOR(i,n) for(i=0;i<n;i++)
#define rep(i,n) for(int i=0;i<n;i++)

int main(){
	int n,a,b,c;
	cin>>n;
	rep(i,n){
		cin>>a>>b>>c;
		cout<<(a*a==b*b+c*c||b*b==a*a+c*c||c*c==a*a+b*b?"YES":"NO")<<endl;
	}
	return 0;
}

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

#define DEBUG

#ifndef DEBUG 
#define fprintf (void)
#endif 

int main(void){
	
	long int rec,i,j,t;
	int count=0;
	long int n[3]={0,0,0};
	
	scanf("%ld",&t);
	
	for(i=0;i<t;i++){
		for(j=0;j<3;j++){
			scanf("%ld",&rec);
			if(rec==0){
				count=1;
			}
			if(rec>n[0]){
				n[2]=n[1];
				n[1]=n[0];	
				n[0]=rec;
			}else if(rec>n[1]){
				n[2]=n[1];
				n[1]=rec;
			}else if(rec>n[2]){
				n[2]=rec;
			}
		}
		if(count=1){
			printf("NO\n");
		}else if(n[0]*n[0]==n[1]*n[1]+n[2]*n[2]){
			printf("YES\n");
		}else{
			printf("NO\n");
		}
	}
	
	return 0;
}

C++: #include <iostream>
#include <vector>
#include <fstream>
#include <algorithm>
#include <iomanip>
#include <map>
#include <queue>
#include <stack>
#include <set>
#include <ctime>
#include <iterator>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
using namespace std;


int main()
{
    int nb_cas;
    cin>>nb_cas;
    while(nb_cas--)
    {
        vector<int> v(3);
        cin>>v[0]>>v[1]>>v[2];
        sort(v.begin(),v.end());
        if(v[0]*v[0]+v[1]*v[1] == v[2]*v[2]) cout<<"YES"<<endl;
        else cout<<"NO"<<endl;
    }
}

C++: #define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cstdio>
#include <cmath>

using namespace std;



int main()
{
	int num;
	int a, b, c;

	cin >> num;

	//cin >> a >> b >> c;

	while (cin >> a >> b >> c) {
		if (a * a + b * b == c * c || a * a + c * c == b * b || b * b + c * c == a * a)
			printf("YES\n");
		else
			printf("NO\n");
	}

		return (0);
	
}