#include <iostream>
#include <stdio.h>
#include <math.h>
using namespace std;

int main(void)
{
	double a, b, c;
	int tyouhoukei = 0, hisigata = 0;
	char op;
	while (cin >> a >> op >> b >> op >> c)
	{
		if (a == b) hisigata++;
		else if (sqrt(a * a + b * b) == c) tyouhoukei++;
	}
	cout << tyouhoukei << endl << hisigata << endl;
	return 0;
}
