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