#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;

int main() {
    double l, r;
    int la = 0, ra = 0, lb = 0, rb = 0, lc = 0, rc = 0, ld = 0, rd = 0;
    while (cin >> l >> r) {
        if (l >= 1.1) la++;
        else if (l >= 0.6) lb++;
        else if (l >= 0.2) lc++;
        else ld++;
        if (r >= 1.1) ra++;
        else if (r >= 0.6) rb++;
        else if (r >= 0.2) rc++;
        else rd++;
    }
    cout << la << ' ' << ra << '\n' << lb << ' ' << rb << '\n' << lc << ' ' << rc << '\n' << ld << ' ' << rd << endl;
}
