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