Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func main() {
	sc.Split(bufio.ScanWords)
	li := make([]int, 3)

	sc.Scan()
	N, _ := strconv.Atoi(sc.Text())

	for i := 0; i < N; i++ {
		for j := 0; j < 3; j++ {
			sc.Scan()
			x, _ := strconv.Atoi(sc.Text())
			li[j] = x
		}
		sort.Ints(li)

		switch li[2]*li[2] == li[1]*li[1]+li[0]*li[0] {
		case true:
			fmt.Println("YES")
		case false:
			fmt.Println("NO")
		default:
		}
	}

}

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

void sort(int data[]) {
    for(int i = 0; i < 3; i++){
        for(int j = i + 1; j < 3; j++){
            if(data[j] < data[i]){
                int tmp = data[j];
                data[j] = data[i];
                data[i] = tmp;
            }
        }
    }
}

int main(void) {
    int i, n;
    cin >> n;
    for (i = 0; i < n; i++) {
        int l[3];
        cin >> l[0] >> l[1] >> l[2];
        sort(l);

        long aa = l[0] * l[0];
        long bb = l[1] * l[1];
        if(sqrt(aa + bb) == l[2]) {
            cout << "YES" << endl;
        }else{
            cout << "NO" << endl;
        }
    }
}

C++: #include<iostream>
#include<cmath>
using namespace std;
 
int main(){
    int len[3];
    while(cin>>len[0]>>len[1]>>len[2]){
		for (int i = 0; i < 3; i++) {
			len[i] = len[i] * len[i];
		}
		if (len[0] + len[1] == len[2] ||
			len[1] + len[2] == len[0] ||
			len[2] + len[0] == len[1])
		{
			cout << "YES\n";
		}
		else {
			cout << "NO\n";
		}
    }
    return 0;
}

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

C++: /*
 *  Author: mizo0203
 *  Problem: 0003
 *  Status: Accepted
 *  Submission Date: 2012/04/15 02:17:30
 */
#include <stdio.h>
#include <math.h>
#include <algorithm>

using namespace std;

int n;
int tri[3];

void init() {
  scanf("%d", &n);
}

bool input() {

  if (!n--)
    return false; // 入力の終わり
  scanf("%d %d %d", &tri[0], &tri[1], &tri[2]);

  return true;
}

int main() {

  init();
  while (input()) {
    sort(tri, tri + 3);
    if (pow(tri[0], 2) + pow(tri[1], 2) == pow(tri[2], 2))
      printf("YES\n");
    else
      printf("NO\n");
  }

  return 0;
}

C++: #include<cstdio>
#include<algorithm>
int main(){
    int n,a[3];
    scanf("%d",&n);
    for(int i=0;i<n;i++){
        for(int j=0;j<3;j++,scanf){
            scanf("%d",&a[j]);
        }
        std::sort(a,a+3);
        if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2]) printf("YES\n");
        else printf("NO\n");
    }
}

C++: #include <stdio.h>
    
int triJudgefunc(int x, int y, int z);
    
int main(void)
{
    int row;
    scanf("%d", &row);
    for (int i = 0; i < row; ++i) {
        int firstn, secondn ,thirdn; 
        scanf("%d %d %d", &firstn, &secondn, &thirdn);
        if (triJudgefunc(firstn, secondn, thirdn) = 0) {
        printf("YES\n");
        } else {
        printf("NO\n");
        }
    }
    return 0;
}
    
    
    
int triJudgefunc(int x, int y, int z)
{
    int maxlength, notmax1, notmax2;
    if (x > y) {    //x > y
        if (x > z) {
            maxlength = x; notmax1 = y; notmax2 = z;    //x???max
        } else {
            notmax1 = x; notmax2 = y; maxlength = z;    //z???max
        }
    } else {    //y > x
        if (y > z) {
            notmax1 = x; maxlength = y; notmax2 = z;    //y???max
        } else {
            notmax1 = x; notmax2 = y; maxlength = z;    //z???max
        }
    }
    int result = maxlength * maxlength - notmax1 * notmax1 - notmax2 * notmax2;
    return result;
}

C++: #include <cstdio>
int main(){
 int n,a,b,c,m;
 scanf("%d",&n);
 while(n>0){
  scanf("%d %d %d",&a,&b,&c);
  m=a>b?(a>c?a:c):(b>c?b:c);
  if (a*a+b*b+c*c==2*m*m) printf("YES\n")
  else printf("NO\n");
  --n;
 };
 return 0;
};

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

int main()
{
        using namespace std;
        deque<int> edge;
        int iedge[3];
        int j;
        int a,b,c;

        cin >> j;

        for(int l=0;l<j;l++){
                for(int i=0;i<3;i++){
                        cin >> iedge[i];
                edge.push_back(iedge[i]);
                }

                sort(edge.begin(),edge.end());
                a = edge[0];
                b = edge[1];
                c = edge[2];
                if(c*c == (a*a+b*b))cout << "Yes\n";
                else cout << "No\n";

        }

        return 0;
}

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

using namespace std;


int main(){
    int a, b, c;
    char* str;
    str = (char*)malloc(sizeof(char) * 50);

    fgets(str, 50, stdin); // 読み捨て

    while(fgets(str, 50, stdin) != NULL) {
        sscanf(str, "%d%d%d", &a, &b, &c);
        a = pow(a, 2);
        b = pow(b, 2);
        c = pow(c, 2);

        cout << ((a + b == c || b + c == a || b + c == a) ? "YES" : "NO") << endl;
    }

    return 0;
}

C++: 
#include <iostream>

using namespace std;

int main() {
    int n;
    cin >> n;
    while(n--) {
        int a, b, c;
        cin >> a >> b >> c;
        if(a+b > c && a+c > b && b+c > a) cout << "YES" << endl;
        else cout << "NO" << endl;
    }
    return 0;
}

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

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

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

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

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

    
  return 0;
}

C++: #include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include<iostream>
using namespace std;

void sort(int* rep) {
	bool flg = true;
	int temp;

	do{
		flg = false;
		if (rep[0] < rep[1]) {
			temp = rep[0];
			rep[0] = rep[1];
			rep[1] = temp;
			flg = true;
		}
		if (rep[1] < rep[2]) {
			temp = rep[1];
			rep[1] = rep[2];
			rep[2] = temp;
			flg = true;
		}
	} while (flg);
}




int main() {

	int size;

	cin >> size;

	int a[3];
	int ans[1000];

	for (int i = 0; i < size; i++) {
		for (int j = 0; j < 3; j++)cin >> a[j];
		sort(a);

		if (a[0] * a[0] == a[1] * a[1] + a[2] * a[2]) {
			ans[i] = true;
		}
		else {
			ans[i] = false;
		}
	}

	for (int i = 0; i < size; i++) {
		if (ans[i])printf("YES\n");
		else printf("NO\n");
	}

	//system("pause");
	return 0;
}

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

int main() {
    int N;
    cin >> N;
    int a, b, c;
    while (N--) {
        cin >> a >> b >> c;
        int l=max(a,max(b,c));
        int x, y;
        if (a==l) {
            x=b;
            y=c;
        } else if (b==l) {
            x=a;
            y=c;
        } else if (c==l) {
            x=a;
            y=b;
        }
        if (l==sqrt(pow(x,2)+pow(y,2))) {
            printf("YES\n");
        } else {
            printf("NO\n");
        }
    }
    return 0;
}