Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func read() string {
	sc.Scan()
	return sc.Text()
}

func main() {
	// sc.Split(bufio.ScanLines)
	sc.Split(bufio.ScanWords)
	n, _ := strconv.Atoi(read())
	s := make([]int, 3)
	for i := 0; i < n; i++ {
		s[0], _ = strconv.Atoi(read())
		s[1], _ = strconv.Atoi(read())
		s[2], _ = strconv.Atoi(read())
		sort.Sort(sort.IntSlice(s))
		if (s[2] * s[2]) == ((s[0] * s[0]) + (s[1] * s[1])) {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

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

int main(){
	int n=0,i=0,k=0,a,b;
	int x[3000] = {0} ;

	while(1){
		cin >> n ;

		if(n <= 1000) break ;
	}

	for(i=0;i<3*n;i+=3){

		while(1){

			cin >> x[i] >> x[i+1] >> x[i+2] ;

			if((x[i] >= 1) && x[i] <=1000){
				if((x[i+1] >= 1) && x[i+1] <=1000){
					if((x[i+2] >= 1) && x[i+2] <=1000){
						break;
				}
			}
		}
		}
		if(x[i+1] > x[i]) {
			k = x[i+1];
			x[i+1] = x[i];
			x[i] = k ;
		}
		if(x[i+2] > x[i]) {
			k = x[i+2];
			x[i+2] = x[i];
			x[i] = k ;
		}
		if(x[i+2] > x[i+1]) {
			k = x[i+2];
			x[i+2] = x[i+1];
			x[i+1] = k ;
		}
	}

	for(i=0;i< 3*n; i+=3){
		a = x[i] * x[i] ;
		b = (x[i+1] * x[i+1] ) + (x[i+2] * x[i+2]) ;

		if( a == b) cout << "YES" << endl ;
		if( a != b) cout << "NO" << endl ;

	}

    return 0;
}

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


string Judge_triangle(int a,int b,int c){
    if(a+b>c && b+c>a && c+a>b){
        return "YES";
    }
    else{
        return "NO";
    }
}

bool Judge_line(int x){
    if(1<=x || x<=1000 || ceil(x) == floor(x))
        return true;
    else
        return false;
}

int main(){
  int N;
  int a,b,c;
  int n=0;
    
    while(1){

  cin >> N;
    
        if(N > 1000 || ceil(N) != floor(N)){
            
        }
    else
        break;
    }
    
    string x[N];

while(N > 0 && cin >> a >> b >> c){
    
    
    while(1){
        if(Judge_line(a) && Judge_line(b) && Judge_line(c)){
            x[n] = Judge_triangle(a,b,c);
            N--;
            n++;
            break;
        }
        
        else{
            break;
        }
  }
}
    for(int i = 0;i < n;i++)
        cout << x[i] << endl;
    
  return 0;
}

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

int main(){
  int num;
  cin>>num;
  for(int i=0;i<num;i++){
    int a[3];
    for(int j=0;j<3;j++){
      cin>>a[j];
    }
    sort(a,a+3,greater<int>());
    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>
using namespace std;

void sjx(double a, double b, double c)
{
	if (a < b + c && b < a + c && c < a + b)
		cout << "yes" << endl;
	else
		cout << "no" << endl;
}
int main()
{
	int a;

C++: #include <iostream>

int main(int argc, char **argv) {
	int num, i, a, b, c;
	
	std::cin >> num;
	
	for(i = 0; i < num; i++) {
		std::cin >> a >> b >> c;
		if (a*a + b*b == c*c ||
		    b*b + c*c == a*a ||
			c*c + a*a == b*b) {
			std::cout << "YES" << std::endl;
		} else {
			std::cout << "NO" << std::endl;
		}
	}
}

C++: #include "stdafx.h"
#include <iostream>
using namespace std;
int n;
int main()
{
	cin >> n;
	int i,a[1000],b[1000],c[1000],x[1000],y[1000],z[1000],res[1000];
	for (i = 0; i < n; i++) {
		cin >> a[i] >> b[i] >> c[i];
		x[i] = a[i];
		if (x[i] < b[i]) {
			y[i] = x[i];
			x[i] = b[i];
		}
		else {
			y[i] = b[i];
		}
		if (x[i] < c[i]) {
			z[i] = y[i];
			y[i] = x[i];
			x[i] = c[i];
		}
		else if (y[i] < c[i]) {
			z[i] = y[i];
			y[i] = c[i];
		}
		else {
			z[i] = c[i];
		}
	}
	for (i = 0; i < n; i++) {
		res[i] = x[i] * x[i] - z[i] * z[i] - y[i] * y[i];
		if (res[i] == 0) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}
	return 0;
}

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

int main() {
    int N, a, b;
    cin >> N;
    vector<int>triangle(3);
    for(int i = 0; i < N; i++){
      for(int j = 0; j < 3; j++){
        cin >> triangle.at(j);
      }
      sort(triangle.begin(), triangle.end());

      int A, B, C;

      A = triangle.at(0);
      B = triangle.at(1);
      C = triangle.at(2);

      if(A * A + B * B == C * C){
        cout << "YES" << endl;
      }
      else{
        cout << "NO" << endl;
      }
    }
}

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


using namespace std;

bool check(vector<int> n){
	if(hypot(n[0],n[1])==n[2])return true;
	else false;
}

int main(){
	int n;
	cin>>n;
	for(int i=0;i<n;i++){
		int a,b,c;
		vector<int> hoge;
		cin>>a>>b>>c;
		hoge.push_back(a);
		hoge.push_back(b);
		hoge.push_back(c);
		sort(hoge.begin(),hoge.end());
		cout<< ( check(hoge)==true ? "YES" : "NO");
	}
	return 0;
}

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

inline bool isDTriangle(int edge[]){
    return edge[2]*edge[2]==edge[0]*edge[0]+edge[1]*edge[1]?true:false;
}

int main(void){
    int edge[3];
    int n;
    std::cin>>n;
    for(int i=0;i<n;i++){
        std::cin>>edge[0]>>edge[1]>>edge[2];
        std::sort(edge,edge+3);
        std::cout<<(isDTriangle(edge)?"YES":"NO")<<std::endl;
    }
    return 0;
}

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

using namespace std;

int main(){
  int n;
  int a,b,c;
  vector<int> list;
  vector< vector<int> > lists;

  cin >> n;

  for(int i=0; i<n; i++){
    cin >> a >> b >> c;
    list.clear();
    list.push_back(a);
    list.push_back(b);
    list.push_back(c);
    sort(list.begin(),list.end());
    lists.push_back(list);
  }

  for(int i=0; i<n; i++){
    list = lists[i];
    if(list[0]*list[0] + list[1]*list[1] == list[2]*list[2]){
      cout << "YES" << endl;
    }else{
      cout << "NO" << endl;
    }
  }
  return 0;
}

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


int main(){
	int i;
	int l[3];
	cin >> i;

	while(i>0){
		for(int j=0; j<3; j++){
			cin >> l[j];
		}

		sort(l,l+3);

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

		i--;
	}

	return 0;
}

C++: #include <iostream>
using namespace std;
#define max(a,b) ((a > b)? a:b)
int main()
{
	int a, b, c, d,i = 0, num;
	cin >> d;
	while (i < d) {
		cin >> a >> b >> c;
		num = max(a, max(b,c));
		if (num == a) {
			if (a * a == b * b + c * c) {
				cout << "YES" << endl; }
			else { cout << "NO" << endl; }
		}
		else if (num == b) {
			if (b * b == a * a + c * c) {
				cout << "YES" << endl;	}
			else { cout << "NO" << endl; }
		}
		else if (num == c) {
			if (c * c == a * a + b * b) {
				cout << "YES" << endl;	}
			else { cout << "NO" << endl; }
		}
		else { cout << "NO" << endl; }
		i++;
	}
    return 0;
}

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

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

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

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

using namespace std;

int main(){

int n;
cin>>n;

for(int i=0;i<n;i++){
int tri[3];

cin>>tri[0]>>tri[1]>>tri[2];
sort(tri,tri+3);

if(tri[0]%1==0 && tri[1]%1==0 && tri[2]%2==0) cout<<"YES"<<endl;
else if(tri[0]%1==0 && tri[1]%3==0 && tri[2]%4==0) cout<<"YES"<<endl;
else if(tri[0]%3==0 && tri[1]%4==0 && tri[2]%5==0) cout<<"YES"<<endl;
else if(tri[0]%5==0 && tri[1]%12==0 && tri[2]%13==0) cout<<"YES"<<endl;
else cout<<"NO"<<endl;
}

return 0;

}