#include <iostream>
#include <algorithm>
#include <iterator>
using namespace std;

int main() {
  double a[3] = {0.2, 0.6, 1.1};
  int c[2][4];
  double l, r;

  for (int i=0; i<4; i++) {
    c[0][i] = c[1][i] = 0;
  }
  while (cin >> l >> r) {
    ++c[0][distance(a, upper_bound(a, a+3, l))];
    ++c[1][distance(a, upper_bound(a, a+3, r))];
  }
  for (int i=3; i>=0; i--) {
    cout << c[0][i] << " " << c[1][i] << endl;
  }
  return 0;
}