#include<cstdio>
#include<iostream>

using namespace std;

int main(void){

	int l1,l2,l3;
	int ty=0,hi=0;

	while(scanf("%d,%d,%d",&l1,&l2,&l3)!=EOF){

		if(l1*l1+l2*l2==l3*l3) ty++;
		if(l1==l2) hi++;
	}

	printf("%d\n%d\n",ty,hi);

	return 0;
}