#include <cstdio>
#include <cstring>
#include <algorithm>
#include <string>
#include <cmath>
#include <stack>
#include <vector>
#include <map>
#include <set>
#include <iostream>


using namespace std;

int main()
{
	int a, b, c;
	int rect = 0;
	int lozen = 0;
	while (scanf("%d,%d,%d", &a, &b, &c) != EOF)
	{
		if (a == b)
			++lozen;
		else if (a*a+b*b == c*c)
			++rect;
	}
	printf("%d\n%d\n", rect, lozen);

	return 0;
}