#include <bits/stdc++.h>

using namespace std;

int main(void) {
  int cnt[2][4] = {};
  double v[2];
  while (cin >> v[0] >> v[1]) {
    for (int i = 0; i < 2; i++) {
      if (v[i] >= 1.1) cnt[i][0]++;
      else if (v[i] >= 0.6) cnt[i][1]++;
      else if (v[i] >= 0.2) cnt[i][2]++;
      else cnt[i][3]++;
    }
  }

  for (int i = 0; i < 4; i++) {
    cout << cnt[0][i] << " " << cnt[1][i] << endl;
  }

  return 0;
}
