#include <bits/stdc++.h>
int main(void) {
  int x, y, z;
  int h_c, t_c;
  while (scanf("%d,%d,%d", &x, &y, &z) != EOF) {
    h_c = t_c = 0;
    if (x == y) {
      h_c++;
    }
    if (z * z == (x * x + y * y)) {
      t_c++;
    }
  }
  printf("%d\n%d\n", t_c, h_c);
  return (0);
}
