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