#include<iostream>
using namespace std;

int main(void){
	int a,b,c;
	char temp;
	int hisi = 0, cho = 0;
	while(!cin.eof()){
		cin >> a >> temp >> b >> temp >> c;
		if(a*a + b*b == c*c)
			cho++;
		if(a == b)
			hisi++;
	}
	cout << cho << endl << hisi << endl;
}