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<stdio.h>

int main(){
  int N = 0 ,i,j,k,tmp = 0;
  int tri[3] = {0,0,0};
  scanf("%d",&N);
  for(i=0;i<N;i++){
    scanf("%d %d %d",&tri[0],&tri[1],&tri[2]);
    for(j = 0;j <= 2;j++){
      for(k = j + 1;k <= 2;k++){
	tmp = tri[j];
	tri[j] = tri[k];
	tri[k] = tmp;
      }
    }
    if(tri[0] * tri[0] == tri[1] * tri[1] + tri[2] * tri[2]){
      printf("YES\n");
    }
    else{
      printf("NO\n");
    }
  }
  return 0;
}

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

  return 0;
}

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

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

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

int main() {
	int n;
	cin >> n;
	for (int i = 0; i < n; i++) {
		vector<int> vec(3);
		for (int j = 0; j < 3; j++) {
			cin >> vec[j];
		}
		sort(vec.begin(), vec.end());
		if (pow(vec[0], 2) + pow(vec[1], 2) == pow(vec[2], 2)) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  int n,j=0;
  int a[3];
  cin>>n;
  while(j<n){
    for(int i=0;i<3;i++){
      cin>>a[i];
    }
    sort(a,a+3);
    if(a[2]*a[2]==a[1]*a[1]+a[0]*a[0]){
    cout<<"Yes"<<endl;
  }
  else{
    cout<<"No"<<endl;
  }
  j++;
  }
  return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <vector>
#include <list>
#include <algorithm>
#include <cmath>
#include <stack>
#include <set>
using namespace std;

#define REP(i,n) for(int (i)=0; (i)<(n); (i)++)
#define FOR(i,a,b) for(int (i)=(a); (i)<(b); (i)++)
#define PUSH(n,v) for(int i=0; i<(n); i++) {int j; cin >> j; v.push_back(j);}
#define ALL(v) v.begin(), v.end()

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

int main() {
    int n;
    cin >> n;
    REP(i,n) {
        int a, b, c;
        cin >> a >> b >> c;
        if (isright(a,b,c)) cout << "YES" << endl;
        else cout << "NO" << endl;
    }
    return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
int a[3];
while(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 <stdio.h>
#include <algorithm>

using namespace std;

int main(void)
{
	int a[3];
	int n;
	
	scanf("%d", &n);
	for (int i = 0; i < n; i++){
		for (int j = 0; j < 3; j++){
			scanf("%d", &a[j]);
		}
		
		sort(a, a + 3);
		
		if (a[0] * a[0] == a[1] * a[1] + a[2] * a[2]){
			puts("YES");
		}
		else {
			puts("NO");
		}
	}
	
	return (0);
}

C++: /*
AOJ_0003_IsitaRightTriangle?

EOFはWindowsはCtrl+Z,UNIXはCtrl+D

方針
配列入れて昇順ソートして　１番目と２番目の二乗の合計が
三番目の二乗になってるか確かめる。

配列の大きさが３固定なので、multisetに格納するのはもったいない
普通の配列に入れて、sortを使う

*/

#include <iostream>
#include <string>
#include <cstdio>
#include <math.h>
#include <algorithm>

using namespace std;

int main() {
	int N, side[3], i,j;

	cin >> N;

	for (i = 0; i < 3; i++){
		cin >> side[0] >> side[1] >> side[2];
		sort(side, side + 3, greater<int>());

		if (pow(side[0], 2) + pow(side[1], 2) == pow(side[2], 2)){
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}	
	}
	return 0;
}

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

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

  scanf("%d",&N);
  for(i = 0;i<N;i++){
    cin >> a >> b >> c;
    a*=a;
    b*=b;
    c*=c;
    if(a+b==c||b+c==a||a+c==b)cout << "YES" << endl;
    else cout << "NO" << endl;

}
  return 0;
}

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

int N;
int a[3]; 
int b,c,d;

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

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

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

C++: #include<stdio.h>

int main(void)
{
  int n;
  int a[100],b[100],c[100];
  int i;
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d",&a[i]);
    scanf("%d",&b[i]);
    scanf("%d",&c[i]);
  }
  for(i=0;i<n;i++){
    if((c[i]*c[i]==a[i]*a[i]+b[i]*b[i]) ||
       (a[i]*a[i]==b[i]*b[i]+c[i]*c[i]) ||
       (b[i]*b[i]==a[i]*a[i]+c[i]*c[i])){
      printf("YES\n");
    }
    else{
      printf("NO\n");
    }
  }
  return(0);
  }

C++: #include<stdio.h>
int main(void)
{
	int N=0;
    unsigned a[1001]={0},b[1001]={0},c[1001]={0};
	int soto=0;
	int i=0;
	scanf("%d",&N);
	for (i=0;i<N;i++)
	{
		scanf("%d %d %d",&a[i],&b[i],&c[i]);
		if (a[i]<b[i])
		{
			soto=a[i];
			a[i]=b[i];
			b[i]=soto;
		}
		if (a[i]<c[i])
		{
			soto=a[i];
			a[i]=c[i];
			c[i]=soto;
		}
	}
	for (i=0;i<N;i++)
	{
		if (a[i]*a[i]==b[i]*b[i]+c[i]*c[i])
		{
			printf("Yes\n");
		}
		else
		{
			printf("No\n");
		}
	}
	return 0;
}

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

int main(){
	int n, a, b, c;
	scanf("%d", &n);
	for (int i = 0; i < n; i++){
		scanf("%d%d%d", &a, &b, &c);
		if ((a > b || a == c)&& b > c){
			if (a * a == b * b + c * c)
				std::cout << "YES\n";
			else
				std::cout << "NO\n";
		}
		else if ((a < b || a == c) && b > c){
			if (a * a + c * c == b * b)
				std::cout << "YES\n";
			else
				std::cout << "NO\n";
		}
		else if ((a < b || a == b) && b < c){
			if (a * a + b * b == c * c)
				std::cout << "YES\n";
			else
				std::cout << "NO\n";
		}
		else
			printf("NO\n");
	}
	return 0;
}

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

class triangle{
    vector<int> data;
    
public:
    triangle() { data.reserve(3); }
    void set(int *a);
    char* isright();
    void clearset() {data.clear();}
};

void triangle::set(int *a)
{
    data.push_back(a[0]);
    data.push_back(a[1]);
    data.push_back(a[2]);

    sort(data.begin(), data.end());
}

char* triangle::isright()
{
    if(data[0] * data[0] + data[1] * data[1] == data[2] * data[2])
        return "YES";
    return "NO";
}

int main()
{
    triangle tri;
    int loop, buff[3];
    cin >> loop;
    for(int c =0; c< loop; c++)
    {
        cin >> buff[0] >> buff[1] >> buff[2];
        tri.set(buff);
        cout << tri.isright() << endl;
        tri.clearset();
    }

    return 0;
}