#include <iostream>
#include <cmath>
using namespace std;

int eyeTest(double eyesight);

int main()
{
    double l;
    double r;
    int result_left[4] = {};
    int result_right[4] = {};
    while(cin >> l >> r)
    {
        result_left[eyeTest(l)]++;
        result_right[eyeTest(r)]++;
    }
    for(int i=0; i<4; i++)
    {
        cout << result_left[i] << " " <<result_right[i] << endl;
    }
    return 0;
}

int eyeTest(double eyesight)
{
    int ret_value;

    if(isgreaterequal(eyesight, 1.1))
    {
        ret_value = 0;
    }
    else if(isgreaterequal(eyesight, 0.6))
    {
        ret_value = 1;
    }
    else if(isgreaterequal(eyesight, 0.2))
    {
        ret_value = 2;
    }
    else
    {
        ret_value = 3;
    }
    return ret_value;
}