#include <cstdio>
#include <algorithm>
using namespace std;
int left[4], right[4];


int calc(const double &a) {
    if (a >= 1.1) return 0;
    else if (a >= 0.6) return 1;
    else if (a >= 0.2) return 2;
    else return 3;
}


int main()  {

    fill(left, left+4, 0); fill(right, right+4, 0);
    double l, r;
    while (scanf("%lf %lf", &l, &r) != EOF) {
        left[calc(l)]++;
        right[calc(r)]++;
    }
    for (int i = 0; i < 4; i++) printf("%d %d\n", left[i], right[i]);
    return 0;
}

