#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <ctime>
#include <iostream>
#include <algorithm>
#include <sstream>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <utility>
using namespace std;

#define rep(i,n) for(int (i)=0; (i)<(int)(n); ++(i))
#define foreach(c,i) for(__typeof((c).begin()) i=(c).begin();i!=(c).end();i++)

const float eye[] = { .2f, .6f, 1.1f, (float)(1<<30) };

int main() {
  float l, r;
  int cl[4], cr[4];

  rep (i,4) cl[i] = cr[i] = 0;
  while (cin >> l >> r) {
    int ll = upper_bound(eye, eye + 4, l) - eye;
    int rl = upper_bound(eye, eye + 4, r) - eye;
    cl[3-ll]++;
    cr[3-rl]++;
  }
  rep (i,4) cout << cl[i] << " " << cr[i] << endl;
  return 0;
}