#include <stdio.h>
#include <math.h>

#define SQ(x)	((x) * (x))

int main(void)
{
	int x[3];
	int rect, dia;
	
	rect = 0;
	dia = 0;
	
	while (scanf("%d,%d,%d", &x[0], &x[1], &x[2]) != EOF){
			
		if (SQ(x[0]) == SQ(x[1]) + SQ(x[2])){
			rect++;
		}
		else if (SQ[1] == SQ2[2]){
			dia++;
		}
		
	}
		printf("%d\n%d\n", rect, dia);
	return (0);
}