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