#include <bits/stdc++.h>
int main() {
  int a[3], tyo = 0, hi = 0, i, j, temp;
  while (scanf("%d,%d,%d", &a[0], &a[1], &a[2]) != EOF) {
    if (a[0] != a[1] && a[0] * a[0] + a[1] * a[1] == a[2] * a[2]) tyo++;
    if (a[0] == a[1]) hi++;
    printf("%d ", tyo);
  }
  printf("%d\n%d\n", tyo, hi);
  return 0;
}
