#include <iostream>
using namespace std;

int main(){
    double l, r;
    int la = 0, lb = 0, lc = 0, ld = 0;
    int ra = 0, rb = 0, rc = 0, rd = 0;
    
    while(cin >> l >> r){
        if(l >= 1.1) la++;
        else if(l >= 0.6 && l < 1.1) lb++;
        else if(l >= 0.2 && l < 0.6) lc++;
        else ld++;

        if(r >= 1.1) ra++;
        else if(r >= 0.6 && r < 1.1) rb++;
        else if(r >= 0.2 && r < 0.6) rc++;
        else rd++;
    }
    cout << la << " " << ra << endl;
    cout << lb << " " << rb << endl;
    cout << lc << " " << rc << endl;
    cout << ld << " " << rd << endl;
}

