#include<iostream>
using namespace std;

int main(){
	int a[3],t,h;
	char d;
	t=h=0;
	while(cin>>a[0]!='\0'){
		cin>>d>>a[1]>>d>>a[2];
		if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2])t++;
		else if(a[0]==a[1])h++;
	}
	cout<<t<<endl<<h<<endl;
}