#include <iostream>
#include <math.h>
#define PI 3.141592
using namespace std;

int main() {
int a,b,c,tyo=0,hishi=0;
char d,e;
while(cin>>a>>d>>b>>e>>c){
	if(a*a+b*b==c*c){
		tyo=tyo+1;
	}
	if(a==b){
		hishi=hishi+1;
	}
}
cout<<tyo<<endl;
cout<<hishi<<endl;
}