#include<iostream>
#include<stdio.h>

int main()
{
	int a, b, c;
	int rect = 0, rhombus = 0;
	
	while( scanf( "%d,%d,%d", &a, &b, &c ) != EOF ){
		if( a == b ){
		 	rhombus++;
		}
		else if( a * a + b * b == c * c ){
			rect++;
		}
	}
	
	std::cout << rect << std::endl;
	std::cout << rhombus << std::endl;

 	return 0;
}