#include <cstdio>
#include <string>
using namespace std;

int a, b, c;
int rec, loz;

int main(){
	rec = loz = 0;
	while (scanf("%d,%d,%d\n", &a, &b, &c)) {
		if (a == b) {
			loz++;
		}
		if (a*a + b*b == c*c) {
			rec++;
		}
	}
	printf("%d\n%d\n", rec, loz);

	return 0;
}