#include <bits/stdc++.h>
int main() {
  int h1, h2, t, tyo = 0, hisi = 0;
  while (1) {
    scanf("%d, %d, %d", &h1, &h2, &t);
    if (h1 == h2)
      hisi++;
    else if (((h1 * h1) + (h2 * h2)) == (t * t))
      tyo++;
    printf("%d\n%d\n", tyo, hisi);
  }
  return 0;
}
