#include <cstdio>

int si[2][4] = {0};

int main(){
	double d[2];
	while(scanf("%lf%lf",&d[0],&d[1]) != EOF){
		for(int i = 0; i < 2; i++){
			d[i] *= 10;
			if(d[i] >= 11){
				si[i][0]++;
			}
			else if(d[i] >= 6){
				si[i][1]++;
			}
			else if(d[i] >= 2){
				si[i][2]++;
			}
			else{
				si[i][3]++;
			}
		}
	}
	for(int i = 0; i < 4; i++){
		printf("%d %d\n",si[0][i],si[1][i]);
	}
	return 0;
}