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