#include <bits/stdc++.h>
int main(void) {
  int length[3];
  int rectangle, diamond;
  rectangle = diamond = 0;
  while (scanf("%d,%d,%d", &length[0], &length[1], &length[2]) != EOF) {
    if ((length[0] * length[0]) + (length[1] * length[1]) ==
        (length[2] * length[2])) {
      rectangle++;
    } else if (length[0] == length[1]) {
      diamond++;
    }
  }
  printf("%d %d\n", rectangle, diamond);
  return (0);
}
