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