Go: package main
// 三角形の形は辺の長さで決まる． 順番に３つの正整数が与えられたとき， 辺の長さがそれらの値と一致する三角形が存在するかどうかを調べ,
//  存在するなら鋭角三角形，直角三角形，鈍角三角形のいずれかを判定し， 次の入力へ進む． 三角形が存在しないとき， それまでに入力された，
// 三角形，直角三角形，鋭角三角形，鈍角三角形の 個数を空白で区切って出力し， それ以降の入力は無視して終了する
// 入力の中には必ず三角形が存在しないようなものがある と仮定してよい. 入力の行数は判らないが各行には３つの正整数が空白で区切って書かれている．
//  ただし，各整数は100 以下とする.

// return
// 三角形 直角三角形　鈍角三角形 鈍角三角形
import (
	"os"
	"fmt"
	"bufio"
)


var sc = bufio.NewScanner(os.Stdin)

func max(a, b, c int) (int, int, int) {
	if a > b {
		if b > c {
			return a, b, c
		} else {
			return c, a, b
		}
	} else {
		if b > c {
			return b, a, c
		} else {
			return c, b, a
		}
	}
}

func find_trianges(a, b, c int) string {
	a, b, c = max(a, b, c)
	r := b*b + c*c
	if a*a > r {
		return "obtuse_triangle"
	} else if a*a < r {
		return "sharped_triangle"
	} else {
		return "right_triangle"
	}
}

func main() {
	s := bufio.NewScanner(os.Stdin)
	var t, r_t, s_t, o_t int = 0, 0, 0, 0
	for s.Scan() {
		var a, b, c int
		fmt.Sscan(s.Text(), &a, &b, &c)
			a, b, c = max(a, b, c)
			if (a < b + c) {
				r := find_trianges(a, b, c)
				switch r {
				case "right_triangle":
					r_t++
				case "sharped_triangle":
					s_t++
				case "obtuse_triangle":
					o_t++
				}
				t++
			}	else {
				break
			}
			
	}
	fmt.Println(t, r_t, s_t, o_t)
}

C++: #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int INF = 1e9;
const ll LINF = 1e18;
inline ll gcd(ll a, ll b) { return b ? gcd(b, a%b) : a; }
inline ll lcm(ll a, ll b) { return a / gcd(a, b)*b; }
template<class S,class T> ostream& operator << (ostream& out,const pair<S,T>& o){ out << "(" << o.first << "," << o.second << ")"; return out; }
template<class T> ostream& operator << (ostream& out,const vector<T>& V){ for(int i = 0; i < V.size(); i++){ out << V[i]; if(i!=V.size()-1) out << " ";} return out; }
template<class T> ostream& operator << (ostream& out,const vector<vector<T> >& Mat){ for(int i = 0; i < Mat.size(); i++) { if(i != 0) out << endl; out << Mat[i];} return out; }
template<class S,class T> ostream& operator << (ostream& out,const map<S,T>& mp){ out << "{ "; for(auto it = mp.begin(); it != mp.end(); it++){ out << it->first << ":" << it->second; if(mp.size()-1 != distance(mp.begin(),it)) out << ", "; } out << " }"; return out; }
template<typename T>vector<T> make_v(size_t a){return vector<T>(a);}
template<typename T,typename... Ts>auto make_v(size_t a,Ts... ts){return vector<decltype(make_v<T>(ts...))>(a,make_v<T>(ts...));}
template<typename T,typename V> typename enable_if<is_class<T>::value==0>::type fill_v(T &t,const V &v){t=v;}
template<typename T,typename V> typename enable_if<is_class<T>::value!=0>::type fill_v(T &t,const V &v){for(auto &e:t) fill_v(e,v);}
/*
 <url:https://onlinejudge.u-aizu.ac.jp/challenges/sources/JOI/Prelim/0582?year=2006>
 問題文============================================================
 =================================================================
 解説=============================================================
 ================================================================
 */

template<class Type>
Type solve(Type res = Type()){
    vector<ll> ans(4);
    
    ll a,b,c;
    while(cin >> a >> b >> c){
        vector<ll> abc = {a,b,c};
        sort(abc.rbegin(),abc.rend());
        a = abc[0]; b = abc[1]; c = abc[2];
        
        if(b+c>a){
            ans[0]++;
            
            if(a*a == b*b+c*c){
                ans[1]++;
            }else if(a*a > b*b + c*c){
                ans[3]++;
            }else{
                ans[2]++;
            }
        }else{
            cout << ans << endl;
            break;
        }
    }
    return res;
}
int main(void) {
    cin.tie(0); ios_base::sync_with_stdio(false);
    solve(0);
    // cout << fixed << setprecision(15) << solve<ll>() << endl;
    return 0;
}

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

int main(){
	int a=0,b=0,c=0;
	int e[3];
	while(scanf("%d%d%d", &e[0], &e[1], &e[2]) != EOF){
		sort(e, e+3);
		if(e[2] >= e[1]+e[0]) continue;
		if(e[2]*e[2] == e[0]*e[0] +e[1]*e[1]) a++;
		if(e[2]*e[2] < e[0]*e[0] +e[1]*e[1]) b++;
		if(e[2]*e[2] > e[0]*e[0] +e[1]*e[1]) c++;
	}
	printf("%d %d %d %d\n", a+b+c, a, b, c);
	return 0;
}

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

#define SIDE side[0] + side[1] - side[2]

using namespace std;

int main()
{
	int side[3];
	int count[4] = {0};
	
	while (1){
		for (int i = 0; i < 3; i++){
			cin >> side[i];
		}
		sort(side, side + 3);
		if (0 >= SIDE){
			break;
		}
		
		for (int i = 0; i < 3; i++){
			side[i] *= side[i];
		}
		if (SIDE == 0){
			count[1]++;
		}
		else if (0 < SIDE){
			count[2]++;
		}
		else if (0 > SIDE){
			count[3]++;
		}
		count[0]++;
	}
	
	for (int i = 0; i < 3; i++){
		cout << count[i] << ' ';
	}
	cout << count[3] << endl;
}

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

int main(){
	int a[3];
	int x=0,y=0,z=0;
	while(true){
		scanf("%d%d%d",&a[0],&a[1],&a[2]);
		sort(a,a+3);
		if(a[0]+a[1] <= a[2]){
			break;
		}
		int tmp = a[0]*a[0]+a[1]*a[1];
		int tmp2 = a[2]*a[2];
		if(tmp == tmp2){
			x++;
		}
		else if(tmp < tmp2){
			z++;
		}
		else{
			y++;
		}
	}
	printf("%d %d %d %d\n",x+y+z,x,y,z);
	return 0;
}

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

using namespace std;
int a[3], total, les, righ, more;
int main(){
    while(cin){
	cin >> a[0] >> a[1] >> a[2];
	sort(a, a + 3);
	if(a[2] >= a[0] + a[1] || a[2] <= a[1] - a[0]){
	    cout << total << " " << righ << " " << more << " " << les << endl;
	    return 0;
	}
	int p = a[2] * a[2];
	int q = a[1] * a[1] + a[0] * a[0];
	if(p > q)les++;
	if(p == q)righ++;
	if(p < q)more++;
	total++;
    }
}

C++: #include <iostream>
#include <algorithm>
 
using namespace std;
 
int main() {
 
  int a[3];
  bool flg = 0;
  int ans[4] ={0};
  while(cin >>a[0] >> a[1] >> a[2]) {
    
    sort(a,a+3);
 
    if(a[0]+a[1] <= a[2] ) flg = 1;
    if(flg == 1) continue;
 
     
    if(a[0]*a[0]+a[1]*a[1] == a[2]*a[2]) ans[0]++;
    else if(a[0]*a[0]+a[1]*a[1] < a[2]*a[2]) ans[1]++;
    else ans[2]++;
 
    ans[3]++;
 
  }
 
  cout <<ans[3]<<" "<<ans[0]<<" "<<ans[2]<<" "<< ans[1]<<endl;
  return 0;
}

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

int main(){
  int x = 0, y = 0, z = 0;
  int a, b, c;

  while(cin >> a >> b >> c){
    if(a + b <= c || a + c <= b || b + c <= a){
      break;
    }

    a *= a;
    b *= b;
    c *= c;

    if(a + b == c || a + c == b || b + c == a){
      x++;
    }
    else if(abs(a - b) < c && c < a + b ||
            abs(a - c) < b && b < a + c ||
            abs(b - c) < a && a < b + c){
      y++;
    }
    else{
      z++;
    }
  }

  cout << x + y + z << " " << x << " " << y << " " << z << endl;
}

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

using namespace std;
int main()
{
    int a[3];
    int cnt=0;
    int cnt1=0;
    int cnt2=0;
    int cnt3=0;
    while(1){
        cin >> a[0] >> a[1] >> a[2];
        sort(a,a+3);
        int min=a[0];
        int max1=a[2];
        int max2=a[1];
        if(abs(max2-max1)>=min||min>=max1+max2){
            break;
        }
        cnt++;
        if(min*min+max2*max2-max1*max1==0){
            cnt1++;
        }else if(min*min+max2*max2-max1*max1>0){
            cnt2++;
        }else{
            cnt3++;
        }
        
    }

    cout << cnt << " " << cnt1 << " " << cnt2 << " " << cnt3 << endl;
    return 0;
}