Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func main() {
	sc.Scan()
	l, _ := strconv.Atoi(sc.Text())
	for i := 0; i < l; i++ {
		sc.Scan()
		s := strings.Split(sc.Text(), " ")
		a, _ := strconv.Atoi(s[0])
		b, _ := strconv.Atoi(s[1])
		c, _ := strconv.Atoi(s[2])

		n := []int{a, b, c}
		sort.Sort(sort.IntSlice(n))

		if square(n[0])+square(n[1]) == square(n[2]) {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

func square(x int) int {
	return x * x
}

C++: 
/*
 * main.cpp
 *
 *  Created on: 2011/04/01
 *      Author: satoki
 *      21:47 ~ 22:08
 */
#include <iostream>
#include <string.h>
using namespace std;

int iN;
int iTra[3];
bool bOutput;

bool input() {
  if (iN > 0)
    scanf("%d %d %d", &iTra[0], &iTra[1], &iTra[2]);
  else
    return false;
  iN--;
  return true;
}

void manage() {
  int i, j, tmp;
  for (i = 0; i < 3; i++) {
    iTra[i] *= iTra[i];
  }
  for (i = 0; i < 3; i++) {
    for (j = 2; j > i; j--) {
      if (iTra[j - 1] > iTra[j]) {
        tmp = iTra[j - 1];
        iTra[j - 1] = iTra[j];
        iTra[j] = tmp;
      }
    }
  }
  if (iTra[0] + iTra[1] == iTra[2])
    bOutput = true;
  else
    bOutput = false;
}

int main() {
  scanf("%d", &iN);
  while (1) {
    if (!input()) break;
    manage();
    if (bOutput)
      printf("YES\n");
    else
      printf("NO\n");
  }
}

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

int main() {
  int n;
  cin >> n;
  int a[3];
  while (n--) {
    cin >> a[0] >> a[1] >> a[2];
    sort(a, a+3);
    string res;
    if (a[0] * a[0] + a[1] * a[1] == a[2] * a[2]) {
      res = "YES";
    } else {
      res = "NO";
    }
    cout << res << endl;
  }
}

C++: #include <stdio.h>
int main() {int N,a,b,c;for (scanf("%d",&N);N--;) {scanf("%d %d %d",&a,&b,&c);if ((a*a+b*b==c*c)||(a*a+c*c==b*b)||(b*b+c*c==a*a)) puts("YES"); else puts("NO");}return 0;}

C++: #include <iostream>
using namespace std;
 
int main()
{
   int a,b,c,x, y, z,n;
 
   // read in n 
   cin>>n;

   // for n set of data, read into 3 sides 
   
   for(int i=1;i<=n;i++)
   {
      cin>>a>>b>>c;          
      x=a*a; y=b*b; z=c*c;
      
      // check if they are triangle
      if(x+y==z||x+z==y||y+z==x)
          cout<<"Yes"<<endl;
      else
          cout<<"No"<<endl;
    }   
    return 0;
}

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

int main(){
    int a,b,c,d;
    while(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;
    }
    return 0;
}

C++: #include<iostream>
using namespace std;
int main(void) {
	int i=1, j, max, a[3],kaisu;
	cin >> kaisu;
	while (1) {
		cin >> a[0] >> a[1] >> a[2];
		if (a[0] >= a[1] && a[0] >= a[2]) {
			if (a[0] * a[0] == a[1] * a[1] + a[2] * a[2])
				cout << "YES" << endl;
			else
				cout << "NO" << endl;
		}
		else if (a[1] >= a[0] && a[1] >= a[2]) {
			if (a[1] * a[1] == a[2] * a[2] + a[0] * a[0])
				cout << "YES" << endl;
			else
				cout << "NO" << endl;
		}
		else
		{
			if (a[2] * a[2] == a[1] * a[1] + a[0] * a[0])
				cout << "YES" << endl;
			else
				cout << "NO" << endl;

		}

		if (i == kaisu)break;
		i++;
	}
	return 0;
}

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

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

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

C++: #include <cstdio>
#include <queue>
#include <vector>

using namespace std;

bool Check(int n,int m,int l){
	if(n == m && m == l && l == n){ return false; }
	priority_queue<int> q;
	q.push(n);
	q.push(m);
	q.push(l);
	int a,b,c;
	c = q.top();
	q.pop();
	b = q.top();
	q.pop();
	a = q.top();
	q.pop();
	if(a * a + b * b == c * c){
		return true;
	}else{
		return false;
	}
}

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

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

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

C++: #include<stdio.h>
#include<math.h>
int main(void)
{
	int n,i,w[1000],a[1000],s[1000],d[1000],x[1000];
	while(scanf("%d",&n)!=EOF){
		for(i=0;i<n;i++){
			scanf("%d %d %d",&a[i],&s[i],&d[i]);
			w[i]=(a[i]*a[i])+(s[i]*s[i]);
			x[i]=d[i]*d[i];
		}
		for(i=0;i<n;i++){
			if(w[i]==x[i]){
				printf("YES\n");
			}
			else{
				printf("NO\n");
			}
		}	
	}
	return 0;
}

C++: #include "bits/stdc++.h"

#define REP(i,num) for(int i=0;i<(num);++i)
#define ALL(c) c.begin(),c.end()
#define PRINTALL(c) for(auto& x:c){cout<<x<<' ';}cout<<endl;
#define PAIRCOMP(c,comp) [](const pair<ll,ll>& lhs,const pair<ll,ll>& rhs){return lhs.c comp rhs.c;}

using namespace std;
using ll = long long;

constexpr ll atcoder_mod = 1e9+7;

template<typename T=int>
T in(){T x; cin >> x; return (x);}
template<typename T=int,typename C=vector<T>>
C vecin(int N){C x(N);REP(i,N){x[i]=in<T>();}return move(x);}

void vout(){cout << endl;}
template<typename Head,typename... Tail>
void vout(Head&& h,Tail&&... t){cout << ' ' << h;vout(forward<Tail>(t)...);}
void out(){cout << endl;}
template<typename Head,typename... Tail>
void out(Head&& h,Tail&&... t){cout << h;vout(forward<Tail>(t)...);}

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	auto N=in();
	REP(i,N){
		auto v=vecin(3);
		sort(ALL(v));
		if(v[0]*v[0]+v[1]*v[1]==v[2]*v[2]) out("YES");
		else out("NO");
	}
	return 0;
}

C++: #include<stdio.h>

int main()
{
	int input_num;
	scanf("%d", &input_num);
	while(0 < input_num--)
	{
		int sides[3];
		scanf("%d %d %d", &sides[0], &sides[1], &sides[2]);

		for(int i = 0; i < 2; i++)
		{
			if(sides[i] > sides[i+1])
			{
				int swap = sides[i];
				sides[i] = sides[i+1];
				sides[i+1] = swap;
 			}
		}
		printf("%s\n", (sides[0]*sides[0]+sides[1]*sides[1]==sides[2]*sides[2]) ? "YES" : "NO");
	}
	return 0;
}

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

int main(){
	int n, a, b, c, x, y, z;
	
	cin >> n;
	for(int i = 0; i < n; i++){
		cin >> a >> b >> c;
		int sum = a + b + c;
		x = max(a,max(b,c));
		y = min(a,min(b,c));
		z = sum - x - y;
		
		if((y*y) + (z*z) == x*x)
			cout << "Yes" << endl;
		else
			cout << "No" << endl;
	}
	
    return 0;
}