#include <stdio.h>

int main(void){
    int cnt[8] = {0};
    double l,r;
    
    while (scanf("%lf%lf",&l,&r)!=EOF){
        if (l<0.2) cnt[3]++;
        else if (l<0.6) cnt[2]++;
        else if (l<1.1) cnt[1]++;
        else cnt[0]++;
        if (r<0.2) cnt[7]++;
        else if (r<0.6) cnt[6]++;
        else if (r<1.1) cnt[5]++;
        else cnt[4]++;
    }
    for (int i=0; i<4; i++){
        printf("%d %d\n",cnt[i],cnt[i+4]);
    }
    
    return 0;
}