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