#include <iostream>

using namespace std;

int main()
{
    int ch[2][4] = {0};
    double lim[4] = {1.1, 0.6, 0.2, 0.1};
    double l, r;

    while (cin >> l >> r) {
        for (int i = 0; i < 4; i++) 
            if (l >= lim[i]) {
                ch[0][i]++;
                break;
            }
        for (int i = 0; i < 4; i++) 
            if (r >= lim[i]) {
                ch[1][i]++;
                break;
            }
    }

    for (int i = 0; i < 4; i++)
        cout << ch[0][i] << " " << ch[1][i] << endl;

    return 0;
}