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