#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
	int rec=0,loz=0;
	int a,b,c;
	while(scanf("%d,%d,%d",&a,&b,&c)!=EOF)
	{
		if(a==b) loz++;
		else if(a*a+b*b==c*c) rec++;
	}
	cout<<rec<<endl;
	cout<<loz<<endl;
  return 0;
}