#include <bits/stdc++.h>

using namespace std;
using ll = long long;
using pii = pair<int, int>;

int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(10);
  
  double l, r;
  int cnt[4][2] = {};
  while (cin >> l >> r) {
    auto check = [&](double x) { return x >= 1.1 ? 0 : x >= 0.6 ? 1 : x >= 0.2 ? 2 : 3; };
    cnt[check(l)][0]++;
    cnt[check(r)][1]++;
  }
  for (int i = 0; i < 4; i++) {
    cout << cnt[i][0] << " " << cnt[i][1] << endl;
  }

  return 0;
}
