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