#include <bits/stdc++.h>
int j(int* a, int* b) { return *a - *b; }
int main() {
  int t, h;
  int a[3];
  t = h = 0;
  while (~scanf("%d,%d,%d", &a[0], &a[1], &a[2])) {
    if (a[2] * a[2] == a[0] * a[0] + a[1] * a[1]) {
      t++;
    } else if (a[1] == a[0] || a[1] == a[2]) {
      h++;
    }
  }
  printf("%d\n%d\n", t, h);
  return 0;
}
