#include <bits/stdc++.h>
int main(void) {
  int alpha = 1;
  int beta = 0;
  int charley = 0;
  int rect = 0;
  int rhom = 0;
  while (alpha != 0) {
    scanf("%d", &alpha);
    scanf(",%d", &beta);
    scanf(",%d", &charley);
    if (charley * charley == alpha * alpha + beta * beta && alpha != 0) rect++;
    if (alpha == beta && alpha != 0) rhom++;
  }
  printf("%d\n", rect);
  printf("%d\n", rhom);
  return 0;
}
