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