#include <iostream>
#include <iomanip>
using namespace std;
void solve(){
    double r,l;
    int right[4] = {0,0,0,0};
    int left[4] = {0,0,0,0};
    while(cin >> l >> r){
        if(r >= 1.1){
            right[0]++;
        }else if(r >= 0.6){
            right[1]++;
        }else if(r >= 0.2){
            right[2]++;
        }else{
            right[3]++;
        }
        if(l >= 1.1){
            left[0]++;
        }else if(l >= 0.6){
            left[1]++;
        }else if(l >= 0.2){
            left[2]++;
        }else{
            left[3]++;
        }
    }
    for(int i=0;i<4;i++){
        cout << left[i] << " " << right[i] << endl;
    }
}
int main(){
    solve();
    return 0;
}