#include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;

int main()
{
    double eye[] = {0.2, 0.6, 1.1};
    int num[4][2] = {0};

    for(;;){
        double a, b;
        if(!(cin >> a >> b))
            break;

        int i = upper_bound(eye, eye+3, a) - eye;
        int j = upper_bound(eye, eye+3, b) - eye;
        ++ num[i][0];
        ++ num[j][1];
    }

    for(int i=3; i>=0; --i)
        cout << num[i][0] << ' ' << num[i][1] << endl;

    return 0;
}