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