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

int main(){
	
	int a,b,c;
	char d;
	int x=0,y=0;
	double h_a,h_b;
	
	while(1){
		cin >> a;
		if(cin.eof()) break;
		cin >> d >> b;
		cin >> d >> c;
		
		if( c*c == a*a + b*b ) x++;
		else if( a == b ) y++;
		else{
			h_a = sqrt ( a*a - (c*(a+b)/a)*(c*(a+b)/a) ) ;
			h_b = sqrt ( b*b - (c*(a+b)/b)*(c*(a+b)/b) ) ;
			if( h_a == h_b ) y++;
		}
	}
	
	cout << x << endl ;
	cout << y << endl ;
	
return 0;
}