#include <iostream>

using namespace std;

int main(void){
	char buf;
	int a,b,c;
	int rec=0,loz=0;
	while(true){
		cin >> a >> buf >> b >> buf >> c;
		if(cin.eof())
			break;
		if(c*c== (a*a+b*b))
			rec++;
		if(a==b)
			loz++;
	}
	cout << rec << endl << loz <<endl;
	return 0;
}