#include <stdio.h>

int main(void)
{
	int l1, l2, l3;
	int i;
	int count1, count2;
	int n;
	
	count1 = count2 = 0;
	
	while (scanf("%d,%d,%d", &l1, &l2, &l3) != EOF){
		if (l1 == l2){
			count2++;
		}
		
		if (l3 * l3 == l1 * l1 + l2 * l2){
			count1++;
		}
	}
	
	printf("%d\n%d\n", count1, count2);
	
	return (0);
}