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