Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func main() {
	var rectangle, diamond int
	for sc.Scan() {
		l := strings.Split(sc.Text(), ",")
		a, _ := strconv.Atoi(l[0])
		b, _ := strconv.Atoi(l[1])
		c, _ := strconv.Atoi(l[2])

		if a*a+b*b == c*c {
			rectangle++
		}
		if a == b {
			diamond++
		}
	}
	fmt.Println(rectangle)
	fmt.Println(diamond)
}

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

using namespace std;

int main(void){

	int l1,l2,l3;
	int ty=0,hi=0;

	while(scanf("%d,%d,%d",&l1,&l2,&l3)!=EOF){

		if(l1*l1+l2*l2==l3*l3) ty++;
		if(l1==l2) hi++;
	}

	printf("%d\n%d\n",ty,hi);

	return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<vector>
#include<cmath>
#include<cstring>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define rp(a) while(a--)
#define pb push_back
#define mp make_pair
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
const double EPS=1e-10;
using namespace std;
typedef long long ll;
typedef vector<int> vi;
int main(){
	int co[2]={0};
	int a,b,c;
	char d;
	while(cin>>a>>d>>b>>d>>c){
		if(hypot(a,b)==c)co[0]++;
		if(a==b)co[1]++;
	}
	rep(i,2)cout<<co[i]<<endl;
}

C++: #define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<stdio.h>
using namespace std;

int main() {
	int a, b, c;
	int co = 0, cp = 0;
	while (scanf("%d,%d,%d", &a, &b, &c)) {
		if ((a*a) + (b*b) == c*c) {
			co++;
		}
		if (a==b&&a + b > c) {
			cp++;
		}
		cout << co << "\n" << cp << endl;
	}
	return 0;
}