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>
bool isRight(int a, int b, int c)
{
    //?????§???c??????????????????????????´???
    if (a > c) {
        std::swap(a, c);
    }
    if (b > c){
        std::swap(b, c);
    }
    
    return a * a + b * b == c * c;
}

int main()
{
    int N;
    int a, b, c;
    std::cin >> N;
    for (int i = 0; i < N; i++) {
        std::cin >> a >> b >> c;
        if (isRight(a, b, c)) {
            std::cout << "YES" << std::endl;
        } else {
            std::cout << "NO" << std::endl;
        }
    }
}

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

int N;
int a[3]; 

int main() {
  for (int i = 0; i < N; ++i) {
    scanf("%d %d %d",a[1],a[2],a[3]);
    sort(a,a+3);
    if (a[1]*a[1] + a[2]*a[2] = a[3]*a[3]) {
      printf("%s\n" , YES);
    } else {
      printf("%s\n" , NO);
    }
  }
  
}

C++: #include <stdio.h>
 
int print(void)
{
    if (C == A + B) {
        printf("YES\n");
    } else if (A == B + C) {
        printf("YES\n");
    } else if (B == C + A) {
        printf("YES\n");
    } else {
        printf("NO\n");
    }
}

int main(void)
{
    int i, N, a, b, c, A, B, C;
    scanf("%d", &N);
    for (i = 0; i < N; i++) {
    scanf("%d %d %d\n", &a, &b, &c);
    A = a * a;
    B = b * b;
    C = c * c;
    print();
    }
    return 0;
}

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

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

  cin >> N;
    
    if(N <= 0 || N > 1000)
        cout << "この数字ではダメです!!" << endl;
    else
        break;
    }
    
    string x[N];

while(N > 0 && cin >> a >> b >> c){
    
    
    while(1){
        if(a < 1 || a > 1000 || b < 1 || b > 1000 || c < 1 || c > 1000){
            cout << "数字を入力し直してください!!" << endl;
            break;
        }
        
        else{
    if(a+b>c && b+c>a && c+a>b){
        x[n]="YES";
    }
    else{
        x[n]="NO";
    }
            N--;
            n++;
            break;
        }
  }
}
    for(int i = 0;i < n;i++)
        cout << x[i] << endl;
    
  return 0;
}

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

C++: #include<stdio.h>
int main()
{
    int a,b,c,T,i;
    scanf("%d",&T);
    for(i=1;i<=T;i++){

        scanf("%d%d%d",&a,&b,&c);
        if((c*c)==((a*a)+(b*b))||(a*a)==((c*c)-(b*b))||(b*b)==((c*c)-(a*a)))
        {
            printf("YES\n");
        }

        else printf("NO\n");
    }
    return 0;
}

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

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

C++: #include<iostream>

unsigned short a, b, c;
bool flag;

int main()
{
	while(std::cin>>a>>b>>c)
	{
		flag = false;
		if((a*a)+(b*b)==(c*c))
		{
			flag = true;
		}
		else if((a*a)+(c*c)==(b*b))
		{
			flag = true;
		}
		else if((b*b)+(c*c)==(a*a))
		{
			flag = true;
		}
		if(flag==false)
		{
			printf("NO\n");
		}
		else
		{
			printf("YES\n");
		}
	}
	return 0;
}

C++: // 2011/05/30 Tazoe

#include <iostream>
using namespace std;

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

	for(int i=0; i<N; i++){
		int a, b, c;
		cin >> a >> b >> c;

		if(b>a&&b>c){
			int tmp = a;
			a = b;
			b = tmp;
		}
		if(c>a&&c>b){
			int tmp = a;
			a = c;
			c = tmp;
		}

		if(a*a==b*b+c*c)
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}

	return 0;
}

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

using namespace std;

int main(void) {
	int max;
	cin >> max;
	
	int a[3];
	for(int i=0; i<max; i++) {
		cin >> a[0] >> a[1] >> a[2];
		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 <vector>
#include <algorithm>
#include <math.h>

using namespace std;

int main(){
	
	int N;
	vector<int> a(3);
	
	cin>>N;
	
	while(N>0){
		for(int i=0;i<3;i++)
			cin>>a[i];
		sort(a.begin(),a.end());
		if(pow(a[2],2.0)==pow(a[1],2.0)+pow(a[0],2.0))
			cout<<"Yes"<<endl;
		else
			cout<<"No"<<endl;
		N--;
	}
	
		
	}

C++: #include<iostream>
#include<array>
#include<algorithm>
#include<cmath>

int main()
{
    std::array<int,3> input;
    int N;
    for(std::cin >> N; N > 0; --N)
    {
        std::cin >> input[0] >> input[1] >> input[2];
        std::sort(begin(input),end(input));
        if(input[2] == hypot(input[1],input[0]))
        {
            std::cout << "YES" << std::endl;
        }
        else
        {
            std::cout << "NO" << std::endl;
        }
    }
    return 0;
}

C++: #include <stdio.h>

int main(int argc,char* argv[]){
  int num;
  int a,b,c;
  int count = 0;
  int ans;

  scanf("%d",&num);

  for(;count < num;++count){
    getchar();
    scanf("%d %d %d",&a,&b,&c);

    if(a > b && b > c){
      ans = (a*a == b*b + c*c) ? 1 : 0;
    }else if(b > c){
      ans = (b*b == a*a + c*c) ? 1 : 0;
    }else{
      ans = (a*a + b*b == c*c) ? 1 : 0;
    }

    printf("%s\n",ans ? "YES" : "NO");
  }

  return 0;
  
}

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

using namespace std;

int main(){
	int n;
	int a[3];
	cin >> n;
	for(int i=0; i<n; i++){
		cin >> a[0] >> a[1] >> a[2];
	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<bits/stdc++.h>
using namespace std;

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

    return 0;
}

C++: #include<stdio.h>
#include<iostream>
using namespace std;
int main(){
  int N=0;
  int a[10000]={0},b[10000]={0},c[10000]={0};
  cin>>N;
  for(int i=0;i<N;i++){
	cin>>a[i]>>b[i]>>c[i];
  }
  for(int i=0;i<N;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]){
     	cout<<"YES"<<endl;
     }
    else{
    	cout<<"NO"<<endl;
    }
  }
  return 0;
}

C++: #include <iostream>

using namespace std;

void solve()
{
	int t;
	cin >> t;
	while(t--)
	{
		int Data[3];
		for(int i = 0; i < 3; ++i)
		{
			cin >> Data[i];
		}
		if((Data[0] * Data[0] + Data[1] * Data[1] == Data[2] * Data[2]) ||
			(Data[1] * Data[1] + Data[2] * Data[2] == Data[1] * Data[1]) || 
			(Data[0] * Data[0] + Data[2] * Data[2] == Data[1] * Data[1]))
		{
			cout << "YES" << endl;
		}
		else
		{
			cout << "NO" << endl;
		}
	}
}

int main()
{
	solve();
	return(0);
}