#include <iostream>
using namespace std;

void count(double input, int* rank) {
    if (input >= 1.1) {
        rank[0]++;
    } else if (input >= 0.6) {
        rank[1]++;
    } else if (input >= 0.2) {
        rank[2]++;
    } else {
        rank[3]++;
    }
}

int main() {
    int leftEyesight[4] = {}, rightEyesight[4] = {};
    double left, right;
    while (cin >> left >> right) {
        count(left, leftEyesight);
        count(right, rightEyesight);
    }
    for (int i = 0; i < 4; i++) {
        cout << leftEyesight[i] << " " << rightEyesight[i] << endl;
    }
}