#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<map>
#include<cstring>
using namespace std;

#define rep(i,n) for(int i=0;i<n;i++)
#define REP(n) rep(i,n)
#define all(n) n.begin(),n.end()

const int L = 0, R = 1, A = 0, B = 1, C = 2, D = 3;

int e[2][4];

int main()
{
    double r,l;
    while(cin >> l >> r)
    {
        if(l < 0.2) e[L][D]++;
        else if(l < 0.6) e[L][C]++;
        else if(l < 1.1) e[L][B]++;
        else e[L][A]++;

        if(r < 0.2) e[R][D]++;
        else if(r < 0.6) e[R][C]++;
        else if(r < 1.1) e[R][B]++;
        else e[R][A]++;

    }
    REP(4)cout << e[L][i] << " " << e[R][i] << endl;

    return 0;
}