#include <iostream>
using namespace std;
class Sight{
    public:
        Sight();
        void setData(double left, double right);
        void getData(int ret[4][2]);

    private:
        int data[4][2];
        int jug(double eye_sight);
};
Sight::Sight(){
    for(int i = 0; i < 4; ++i){
        for (int j = 0; j < 2; j++) {
            data[i][j] = 0;
        }
    }
}
int Sight::jug(double eye_sight){
    if (eye_sight >= 1.1) {
        return 0;
    }
    else if (eye_sight >= 0.6) {
        return 1;
    }
    else if (eye_sight >= 0.2) {
        return 2;
    }
    else {
        return 3;
    }
}
void Sight::setData(double left, double right){
    ++data[jug(left)][0];
    ++data[jug(right)][1];
}
void Sight::getData(int ret[4][2]){
    for(int i = 0; i < 4; ++i){
        for(int j = 0; j < 2; ++j){
            ret[i][j] = data[i][j];
        }
    }
}
int main(){
    double right, left;
    Sight sight;
    while (cin >> left >> right) {
        sight.setData(left, right);
    }
    int ret[4][2];
    sight.getData(ret);

    for(int i = 0; i < 4; ++i){
        cout << ret[i][0] << " " << ret[i][1] << endl;
    }
}