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