#include <iostream>
#include <string>
#include <vector>
using namespace std;

int main() {
    int Al, Ar, Bl, Br, Cl, Cr, Dl, Dr;
    Al = Ar = Bl = Br = Cl = Cr = Dl = Dr = 0;
    double l, r;
    while (cin >> l >> r) {
        if (1.1 <= l) Al ++;
        else if (0.6 <= l) Bl ++;
        else if (0.2 <= l) Cl ++;
        else Dl ++;

        if (1.1 <= r) Ar ++;
        else if (0.6 <= r) Br ++;
        else if (0.2 <= r) Cr ++;
        else Dr ++;
    }
    cout << Al << " " << Ar << endl;
    cout << Bl << " " << Br << endl;
    cout << Cl << " " << Cr << endl;
    cout << Dl << " " << Dr << endl;
    return 0;
}