#include <bits/stdc++.h>
int main(void) {
  int l, m, n, r, s;
  while (scanf("%d,%d,%d", &l, &m, &n))
    ;
  {
    if (l == m) r++;
    if (n * n == m * m + l * l) s++;
  }
  printf("%d\n", r);
  printf("%d\n", s);
  return 0;
}
