#include<iostream>
#include <stdio.h>
#include <vector>
using namespace std;
int loect=0,hisi=0;
int main(){int a1,a2,aa;char b1,b2;
while(cin>>a1>>b1>>a2>>b2>>aa){
	if(a1==a2){hisi++;}
	if(aa*aa==a1*a1+a2*a2){loect++;}}
cout<<loect<<endl<<hisi<<endl;
	return 0;}
