#include<iostream>
using namespace std;
int main() {
	int a, b, d, r, h;
	char c;
	while (cin >> a >> c >> b >> c >> d) {
		r = 0;
		h = 0;
		if (a == b){
			h += 1;
		}
		else if (a*a + b*b == c*c){
			r += 1;
		}
	}
	cout << r << endl << h << endl;
}