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 <algorithm>
#include <iostream>
using namespace std;

int main(){
    int n;
    scanf("%d", &n);
    int sides[3];
    for (int i = 0; i < n; i++){
	cin >> sides[0] >> sides[1] >> sides[2];
	sort(sides, sides+3);
	printf("%s", (sides[0]^2 + sides[1]^2 == sides[2]^2)? "YES" : "NO");
    }
}

C++: #Include <iostream>
#include <vector>
#include <map>
#include <set>
#include <algorithm>
#include <numeric>
#include <cmath>
using namespace std;
typedef vector<int> VI;
#define REP( i, m, n ) for ( int i = (int)( m ); i < (int)( n ); ++i )

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

    vector<vector<int>> triangles;
    
    int n;
    cin >> n;
    
    REP(i, 0, n) {
        vector<int> tmp;
        int a, b, c;
        cin >> a >> b >> c;
        tmp.push_back(a);
        tmp.push_back(b);
        tmp.push_back(c);
        
        sort(tmp.begin(), tmp.end());
        triangles.push_back(tmp);
    }

    for(auto sides : triangles) {
        if (sides[2] * sides[2] == sides[0]*sides[0]+sides[1]*sides[1]) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }
    
    return 0;
}

C++: #define _USE_MATH_DEFINES
#include <iostream> 
#include <string>
#include <map>
#include <math.h>
#include <vector>
#include <algorithm>
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(a*a+b*b == c*c || a*a+c*c <= b*b || b*b+c*c <= a*a){
			cout << "YES" << endl;
		}
		else{
			cout << "NO" << endl;
		}
	}
	return 0;
}

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

#define ALL(a) a.begin(),a.end()

using namespace std;

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

  for ( int i = 0; i < n; i++ ) {
    vector<int> v;
    int t;
    for ( int j = 0; j < 3; j++ ) {
      cin >> t;
      v.push_back( t );
    }
    sort(ALL(v));

    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>
using namespace std;
int main() {
	int a, b, c, N;
	cin >> N;
	for(int i=0; i<N; i++) {
		cin >> a >> b >> c;
		cout << (((a*a==b*b+c*c) || (b*b==c*c+a*a) || (c*c==a*a+b*b)) ? "YES" : "NO") << endl;
	}
}

C++: //AOJ0003 Is it a Right Triangle?
#include <stdio.h>

int main(){
	int i,num[3],line;
	scanf("%d",&line);
	for(i = 0; i < line; i++){
		if(scanf("%d %d %d",&num[0],&num[1],&num[2]) == EOF)break;
		if((num[0]*num[0] == num[1]*num[1]+num[2]*num[2])
			|| (num[1]*num[1] == num[0]*num[0]+num[2]*num[2])
			|| (num[2]*num[2] == num[0]*num[0]+num[1]*num[1]))
			printf("YES\n");
		else printf("NO\n");
		num[0]=0;num[1]=0;num[2]=0;
	}
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
long long a, b, c, d;
int main(){
	cin>>a;
	for(int i=0;i<a;i++){
		cin>>b>>c>>d;
		
		if(b>c&&b>d){
			if(((d*d)+(c*c))==(b*b))	
				cout<<"YES"<<endl;
			else
				cout<<"NO"<<endl;
		}
		else if(d>c&&d>b){
			if(((b*b)+(c*c))==(d*d))	
				cout<<"YES"<<endl;
			else
				cout<<"NO"<<endl;
		}
		else if(c>d&&c>b){
			if(((d*d)+(b*b))==(c*c))	
				cout<<"YES"<<endl;
			else
				cout<<"NO"<<endl;
		}
		else
			cout<<"NO"<<endl;
	}
}

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

using namespace std;

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

	int a[3];
	for (int i = 0; i < loopSize; ++i) {
		cin >> a[0] >> a[1] >> a[2];
		sort(a, a + 2);
		if (a[0] * a[0] + a[1] * a[1] == a[2] * a[2]) {
			cout << "YES" << endl;
			continue;
		}
		cout << "NO" << endl;
	}
    return 0;
}

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

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

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

C++: #include <iostream>

int triangle(int x, int y, int z)
{
	int a = x * x;
	int b = y * y;
	int c = z * z;
	return (a + b - c) * (b + c - a) * (c + a - b);
}

int main()
{
	int N, x, y, z;
	
	std::cin >> N;
	
	for(int i = 0; i < N; i++){
		std::cin >> x >> y >> z;
		if ( triangle(x, y, z) == 0 ){
			std::cout << "YES" << std::endl;
		} else {
			std::cout << "NO" << std::endl;
		}
	}
	
	return 0;
}

C++: #include<iostream>
#include<queue>
#include<string>
#include<stack>
#include<cstdio>
#include<algorithm>

using namespace std;

int main(void)
{
  int a[3];
  int i;
  int n;

  cin>>n;

  for(i=0;i<n;i++)
    {
      cin>>a[0]>>a[1]>>a[2];

      sort(a,a+3);

        if(a[2]*a[2]==a[0]*a[0]+a[1]*a[1])
          cout<<"YES"<<endl;

        else
          cout<<"NO"<<endl;
    }

}

C++: #include<stdio.h>

void tri(int x, int y, int z)
{
    if((x == y + z) || (y == z + x) || (z == x + y)) {
        printf("YES\n");
    }else {
        printf("NO\n");
    }    
}

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

    scanf("%d", &num);

    for(int i = 0; i < num; i++) {
        scanf("%d %d %d", &a, &b, &c);
        tri(a*a, b*b, c*c);
    }

    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;
        }
    }   
                                                            1,1          ??????

C++: #include<iostream>
int main(){int ts,x,y,z;std::cin>>ts;for(;ts--;std::cout<<(x+y-z&&y+z-x&&z+x-y?"NO\n":"YES\n"))std::cin>>x>>y>>z,x*=x,y*=y,z*=z;}

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

#define FOR(i,l,r) for(int i = (l);i < (r);i++)
#define ALL(x) (x).begin(),(x).end()
template<typename T> bool chmax(T& a,const T& b){return a < b ? (a = b,true) : false;}
template<typename T> bool chmin(T& a,const T& b){return b < a ? (a = b,true) : false;}
typedef long long ll;

int N;

int main()
{
	scanf("%d",&N);
	FOR(i,0,N){
		int A [3];
		scanf("%d%d%d",&A [0],&A [1],&A [2]);
		sort(A,A + 3);
		if(A [0] + A [1] > A [2] && A [0] * A [0] + A [1] * A [1] == A [2] * A [2]){
			printf("Yes\n");
		}
		else{
			printf("No\n");
		}
	}

	return 0;
}