//AOJ0032

#include<iostream>

using namespace std;

int main(){

	int x,y,z;
	int sum1=0,sum2=0;
	char tmp;

	while(cin>>x){
		cin>>tmp;
		cin>>y;
		cin>>tmp;
		cin>>z;

		if(x==y){
			sum2++;
		}

		if(x*x+y*y==z*z){
			sum1++;
		}
	}

	cout<<sum1<<endl<<sum2<<endl;

	return 0;
}