#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int a[3];
  int rect = 0, rhom = 0;
  while (true) {
    scanf("%d,%d,%d", &a[0], &a[1], &a[2]);
    sort(a, a + 3);
    if (a[0] = a[1])
      rhom++;
    else
      rect++;
  }
  cout << rect << "\n" << rhom << endl;
  return 0;
}
