Go: package main

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

func main() {
	n, _ := strconv.Atoi(strScan())
	scanner := bufio.NewScanner(os.Stdin)
	for i := 0; i < n; i++ {
		scanner.Scan()
		strArr := strings.Fields(scanner.Text())
		castNumArr := StringToInt(strArr)
		fmt.Println(checkTriangle(castNumArr))
	}
}

func checkTriangle(i []int) string {
	if checkSt(i[0], i[1], i[2]) || checkSt(i[1], i[2], i[0]) || checkSt(i[2], i[0], i[1]) {
		return "YES"
	} else {
		return "NO"
	}
}

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

func checkSt(a, b, c int) bool {
	return (Sq(a) + Sq(b)) == Sq(c)

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

using namespace std;

int main(void){
	int n; cin >> n;
	while(n --){
		int in[3];
		for(int i = 0; i < 3; i ++) cin >> in[i];
		sort(in, in + 3);
		cout << ((in[2] * in[2] == in[1] * in[1] + in[0] * in[0]) ? "YES":"NO") << endl;
	}

	return 0;
}

C++: 
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <string>
#include <vector>
#include <set>
#include <map>
#define pi 3.14159265358979323846264338
using namespace std;

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

C++: #include <stdio.h>

void right_triangle(int a, int b, int c);

int main(void)
{
    int n;
    scanf("%d", &n);
    for (int count = 0; count < n; ++count) {
        int x, y, z;
        scanf("%d %d %d", &x, &y, &z);
        right_triangle(x, y, z);
    }
    return 0;
}

void right_triangle(int a, int b, int c)
{
    if (a * a == b * b + c * c || b * b == a * a + c * c || c * c == a * a + b * b) {
        printf("YES\n");
    } else {
        printf("NO\n");
    }
}

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

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

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


void max(int &,int &,int &);
void swap(int &,int &);
//std::string triangle(int&,int &,int &);

int main(){

  int N;

  std::cin >> N;

  for(int i=0;i<N;i++){
      int a,b,c,d,e;
      std::cin >> a >> b >> c;
      max(a,b,c);
     // std::string y;
        
      d = b*b;
      e = a*a;

     if(c*c ==d+e) std::cout << "YES" << std::endl;
     else std::cout << "NO" << std::endl;


  }
 return 0;
}

void max(int &a,int &b,int &c){
  if(a>b){
       swap(a,b);
  }
  if(b>c){
       swap(b,c);
  }
  if(a<b){
       swap(a,b);
  }

  //std::cout << a << b << c;
}

void swap(int& i, int& j){
  int k;
  k = i;
  i = j;
  j = k;
}

//std::string triangle(int &c,int &d,int &e){
//    std::string y;
//   if(c*c == d+e)
//        y= "YES";
//   else y="NO";
//}

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

int main()
{
	int a, b, c, d;
	int ans;
	
	cin >> d;
		for(int i = 0; i < d; i++)
		{
			cin >> a >> b >> c;
	
		if (a >= b && b >= c)
		{
			ans = a * a - b * b - c * c;
			if(ans == 0)
			{
				cout << "YES" << endl;
			}
			else
			{
				cout << "NO" << endl;
			}
		}
	
		else if(b >= a && a >= c)
		{
			ans = b * b - a * a - c * c;
			if(ans == 0)
			{
				cout << "YES" << endl;
			}
			else
			{
				cout << "NO" << endl;
			}
		}	
	
		else
		{
			ans = c * c - a * a - b * b;
			if(ans == 0)
			{
				cout << "YES" << endl;
			}
			else
			{
				cout << "NO" << endl;
			}
		}
	}
	return 0;
}

C++: #include<stdio.h>

int main(void)
{
	int i;
	int x[1000]={0},y[1000]={0},z[1000]={0},hantei[1000];
	int j=0,e=0;

	while(e==0)
	{
		scanf("%d %d %d",&x[j],&y[j],&z[j]);
		
		if(x[j]<1 || 1000<x[j] || y[j]<1 || 1000<y[j] || z[j]<1 || 1000<z[j])break;

		j=j+1;
	}

	for(i=0;i<j;i++)
	{
		if(y[i]<x[i] && z[i]<x[i])
		{
			if(x[i]*x[i] == y[i]*y[i]+z[i]*z[i])
				hantei[i]=1;
			else
				hantei[i]=0;
		}
		else if(x[i]<y[i] && z[i]<y[i])
		{
			if(y[i]*y[i] == x[i]*x[i]+z[i]*z[i])
				hantei[i]=1;
			else
				hantei[i]=0;
		}
		else
		{
			if(z[i]*z[i] == x[i]*x[i]+y[i]*y[i])
				hantei[i]=1;
			else
				hantei[i]=0;
		}
	}
	for(i=0;i<j;i++)
	  {   
	     if(hantei[i]==0)
		 {
			 printf("NO\n");
		 }
		 else if(hantei[i]==1)
		 {
			 printf("YES\n");
		 }
	  }

	return 0;
}

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

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

C++: #include <cstdio>
#include <algorithm>
#include <iostream>
#include <cmath>
using namespace std;
int main(){
    int c,t[3],i;
    cin>>c;
    while(c--){
        for(i=0;i<3;i++){
        cin>>t[i];
      }
      sort(t,t+3);
      if(t[0]*t[0]+t[1]*t[1]==t[2]*t[2]) {
        cout<<"YES"<<endl;
      }
      else cout<<"NO"<<endl;
    }
    return 0;
}

C++: #include<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<string>
#include<algorithm>
#include<vector> 
#include<limits>
#include<numeric>
#include<math.h>
using namespace std;

#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define in(x) cin >> x
#define out(str) cout << str << endl

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

int N,a,b,c,A,B,C;

int main(){
    cin>>N;
    rep(i,N){
        cin>>a>>b>>c;
        A=a*a;
        B=b*b;
        C=c*c;
        if(A+B==C||B+C==A||C+A==B){
            out("Yes");
        }
        else{
            out("No");
        }
    }
}

C++: #include<iostream>

using namespace std;

int main(){
	
	int n;
	int x, y, z;
	
	cin >> n;
	for (int i = 0; i < n; i++){
		cin >> x >> y >> z;
		if(x > y && x > z){
			if((x * x) == ((y * y) + (z * z))){
				cout << "YES" << endl;
			}else{
				cout << "NO" << endl;
			}
		}else if(y > x && y > z){
			if((y * y) == ((x * x) + (z * z))){
				cout << "YES" << endl;
			}else{
				cout << "NO" << endl;
			}
		}else {
			if((z * z) == ((x * x) + (y * y))){
				cout << "YES" << endl;
			}else{
				cout << "NO" << endl;
			}
		}
		
	}
	
	return 0;
}

C++:   nano 2.6.1                                                      File: 29.cpp                                                                 

#include <iostream>
#include <sstream>

int main()
{
        unsigned int count=0;
        std::cin>>count;
        std::string* res;
        res=new std::string [count+1];
        for(unsigned int i=0;i<=count;i++)
        {
                std::string str;
                getline(std::cin,str);
                unsigned int a,b,c;
                std::stringstream s(str);
                s>>a>>b>>c;
                if((a*a==b*b+c*c)||(b*b==a*a+c*c)||(c*c==a*a+b*b))
                        res[i]="YES";
                else
                        res[i]="NO";
        }
        for(unsigned int i=1;i<=count;i++)
                std::cout<<res[i]<<std::endl;
        return 0;
}

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

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