#include <bits/stdc++.h>
int main(void) {
  int a, b, c, count = 0, count2 = 0;
  while (scanf("%d,%d%,%d", &a, &b, &c) != EOF) {
    if (a * a + b * b == c * c)
      count++;
    else if (a == b)
      count2++;
  }
  printf("%d\n%d\n", count, count2);
  return 0;
}
