#include <iostream>
using namespace std;

const double EPS = 1e-10;

int n;
int ls[4], rs[4];

int main()
{
    double l,r;
    for(int i = 0; i < 4; i++) 
        ls[i] = rs[i] = 0;

    n = 0;
    while(cin >> l >> r) {
        if(l - EPS > 1.1) ls[0]++;
        else if(l - EPS > 0.6 && l < 1.1) ls[1]++;
        else if(l - EPS > 0.2 && l < 0.6) ls[2]++;
        else ls[3]++;

        if(r - EPS > 1.1) rs[0]++;
        else if(r - EPS > 0.6 && r < 1.1) rs[1]++;
        else if(r - EPS > 0.2 && r < 0.6) rs[2]++;
        else rs[3]++;
        n++;
    }
    
    for(int i = 0; i < n; i++) 
        cout << ls[i] << " " << rs[i] << endl;

}