#include<iostream>
using namespace std;

int main() {
	int a, b, c;
	char ch;
	int rec = 0, rho = 0;
	while (cin >> a >> ch >> b >> ch >> c) {
		if (a * a + b * b == c * c)
			rec++;
		if (a == b)
			rho++;
	}
	cout << rec << endl;
	cout << rho << endl;
}
