#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
	int a[100],b[100],c[100],num=0,num1=0;
	while(scanf("%d,%d,%d",&a[0],&b[0],&c[0])!=EOF)
	{
	 for(int i=1;i<4;i++)	
         scanf("%d,%d,%d",&a[i],&b[i],&c[i]);
   	 for(int i=0;i<4;i++)	
    {
    	if(a[i]*a[i]+b[i]*b[i]==c[i]*c[i]&&a[i]<c[i]&&b[i]<c[i]&&a[i]>0&&b[i]>0&&c[i]>0)
		  num++;
		 if(a[i]==b[i]&&a[i]+b[i]>c[i]&&a[i]-b[i]<c[i]&&a[i]>0&&b[i]>0&&c[i]>0)
		 	 num1++;
    }

    cout<<num<<endl;
	cout<<num1<<endl;
	num=0;
	num1=0;
	}
	return 0;
}