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++: int main(){
	int n;
	cin>>n;
	int hen1,hen2,hen3,saidai;

	for(int i=0;i<n;i++){
	cin>>hen1>>hen2>>hen3;

	saidai=hen1;
	if(saidai<hen2){
		saidai=hen2;
		hen2=0;
	}
	else if(saidai<hen3){
		saidai=hen3;
		hen3=0;
	}
	else if(saidai==hen1)
		hen1=0;
	if(saidai*saidai==hen1*hen1+hen2*hen2+hen3*hen3)
		cout<<"YES"<<"\n";
	else{
		cout<<"NO"<<"\n";
	}
	}
	
	
	return 0;
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <cstring>
#include <climits>
#include <algorithm>
#include <map>

using namespace std;

int main() {
    int N;
    cin >> N;
    
    int a, b, c;
    for (int i=0; i<N; i++) {
        cin >> a >> b >> c;
        if (b > c) swap(b, c);
        if (a > c) swap(a, c);
        cout << (c*c == a*a+b*b ? "YES" : "NO") << endl;
    }
    return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
	int n;
	cin>>n;
	while(n--){
		int a[3];
		for(int i=0;i<3;i++)
			cin>>a[i];
		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 <cstdio>
#include <cmath>
#include <vector>
#include <algorithm>
using namespace std;

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

int main(void) {
    int num; cin >> num;
    vector<int> vec(3);
    for(int r = 0; r < num; r++) {
        cin >> vec[0] >> vec[1] >> vec[2];
        sort(vec.begin(), vec.end());
        cout << (isRightTriangle(vec[0], vec[1], vec[2]) ? "YES" : "NO") << endl;
    }
    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<algorithm>
using namespace std;

int main()
{
    int i;
    int a[3];
    cin >> i;
    for (int n = 0; n < i; n++) {
        for (int j = 0; j < 3; j++)
            cin >> a[j];
        sort(a, a + 3);
        if (a[0] * a[0] == a[2] * a[2] + a[1] * a[1])
            cout << "Yes" << endl;
        else
            cout << "No" << endl;
    }
    return 0;
}

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

void swap(int &a,int &b){
    a = a-b ;
    b += a ;
    a = b-a ;
}

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

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);
		
		m=max(m,a[2]);
		int d = 10;
		if(a[0]>d || a[1]>d || a[2]>d)puts("hogehogehoge");
		int s = 9;
		if(a[0]*a[0]+a[1]*a[1] == a[2]*a[2]){
			if(m<=s)puts("YES");
			else puts("NO");
		}else{
			if(m<=s)puts("NO");
			else puts("YES");
		}
	}
}

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

int N ;
int x,y,z ;

int main()
{
	cin >> N ;

	for( int i = 0 ; i < N ; i ++ )
	{
		cin >> x >> y >> z ;

		if( ((x*x) == ((y*y) + (z*z))) || ((y*y) == ((x*x) + (z*z))) || ((z*z) == ((x*x) + (y*y))) )
		{
			cout << "YES" << endl ;
		}
		else
		{
			cout << "NO" << endl ;
		}
	}
}

C++: #include <bits/stdc++.h>

using namespace std;


#define REP(i,n) for(ll i=0;i<n;++i)
#define RREP(i,n) for(ll i=n-1;i>=0;--i)
#define FOR(i,m,n) for(ll i=m;i<n;++i)
#define RFOR(i,m,n) for(ll i=n-1;i>=m;--i)
#define ALL(v) (v).begin(),v).end()

#define PB(a) push_back(a)
#define MOD 1000000007

typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> VI;
typedef vector<VI> VVI;
const double PI = 3.14159265358979323846;
const double EPS = 1e-12;
const int INF = numeric_limits<int>::max() / 2;
const int NEG_INF = numeric_limits<int>::min() / 2;

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);

  int n;cin>>n;
  for(int j=0;j<n;j++){
      std::vector<int> v(3);
      for(int i=0;i<3;i++) cin>>v[i];
      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;
  }
  return 0;
}

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

int main(){
  int a,b,c;
  std::cin>>a;
  std::cin>>b;
  std::cin>>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++: using System;

class Program
{
    static bool checking(int[] a)
    {
        return (a[0] + a[1] == a[2] || a[1] + a[2] == a[0] || a[2] + a[0] == a[1]);
    }

    static int Main()
    {   
        int[] a = new int[3];
        int inp,n;
        string[] str;
        string result;

        n = int.Parse(Console.ReadLine());
        for (int i = 0; i < n; i++)
        {
            str = (Console.ReadLine()).Split(' ');
            for (int j = 0; j < 3; j++)
            {
                
                inp = int.Parse(str[j]);
                a[j] = inp * inp;
            }

            if (checking(a))
                result = "YES";
            else
                result = "NO";

            Console.WriteLine("{0}", result);

        }

        



        return 0;
    }
}

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

C++: #include<iostream>

bool right_triangle(int a,int b,int c)
{
    if (a*a + b*b == c*c || b*b + c*c == a*a || c*c + a*a == b*b) {
        return true;
    }else{
        return false;
    }   
}

int main()
{
    int x,y,z,N;
    std::cin >> N;
    for (int i = 0; i < N; i++) {
        std::cin >> x >> y >> z;
        if (right_triangle(x,y,z)) {
            std::cout << "Yes" << std::endl;
        }else if (right_triangle(x,y,z) == 0 ) { 
            std::cout << "No" << std::endl;
        }
    }
    return 0;
}
                                                            1,1          ??????

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

int main()
{
    int set;
    int num[3];
    int a,b,c;
    
    if(set < 1000)
        cin >> set;
        
    for(int i = 0; i < set; i++){
        for(int j =0; j < 3; j++){
            cin >> num[j];
        }
        sort(num, num+3);
        if(num[0] * num[0] + num[1] * num[1] == num[2] * num[2]){
            cout << "YES" << endl;
        }else{
            cout << "NO" << endl;
        }
    }

    return 0;
}