#include <bits/stdc++.h>
int main(void) {
  float x[3];
  float len;
  int rect, dia;
  rect = 0;
  dia = 0;
  while (scanf("%f,%f,%f", &x[0], &x[1], &x[2]) != EOF) {
    len = sqrt(x[0] + x[1]);
    if (len == x[2] && x[0] != 0 && x[1] != 0 && x[2] != 0) {
      rect++;
    } else if (x[0] == x[1] && x[0] != 0 && x[1] != 0 && x[2] != 0) {
      dia++;
    }
  }
  printf("%d\n%d\n", rect, dia);
  return (0);
}
