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