#include <iostream>
#include <string>
#include <stack>
#include <queue>
#include <vector>
#include <algorithm>
#include <cmath>

using namespace std;

#define loop(i,a,b) for(int i=(a);i<int(b);i++)
#define rep(i,b) loop(i,0,b)
#define all(c) (c).begin(), (c).end()
double const eps = 1e-8;

int f(double x){
    if (x + eps >= 1.1){
        return 'A';
    }
    if (x + eps >= 0.6){
        return 'B';
    }
    if (x + eps >= 0.2){
        return 'C';
    }
    return 'D';
}

int main(){
    double L, R;
    int ans[256][2] = {};
    while (cin >> L >> R){
        ans[f(L)][0]++;
        ans[f(R)][1]++;
    }
    rep(i, 4){
        cout << ans["ABCD"[i]][0] << " " << ans["ABCD"[i]][1] << endl;
    }
}