#include <iostream>
#include <map>

using namespace std;

int main() {
    map<char, int> ls, rs;
    double l, r;
    while (cin >> l >> r) {
        if (1.1 <= l) ls['A']++;
        else if (0.6 <= l && l < 1.1) ls['B']++;
        else if (0.2 <= l && l < 0.6) ls['C']++;
        else ls['D']++;

        if (1.1 <= r) rs['A']++;
        else if (0.6 <= r && r < 1.1) rs['B']++;
        else if (0.2 <= r && r < 0.6) rs['C']++;
        else rs['D']++;
    }

    for (char c = 'A'; c <= 'D'; c++) {
        cout << ls[c] << ' ' << rs[c] << endl;
    }
    return 0;
}


        