#include	<iostream>
#include	<cstdio>
#include	<cmath>

using namespace std;

int main(void) {
	int tyou = 0, hisi = 0;
	while(1) {
		int a, b, c;
		if( scanf("%d,%d,%d", &a, &b, &c) == EOF )	{ break; }
		if(a == b) {
			hisi++;
		} else if( b * b + a * a == c * c ) {
			tyou++;
		}
	}
	cout << tyou << endl << hisi << endl;
	return 0;
}