#include <cstdio>

int eye[2][4];
double x[2];

int main(){
	while(scanf("%lf%lf",&x[0],&x[1]) != EOF){
		for(int i = 0; i < 2; i++){
			if(x[i] >= 1.1) eye[i][0]++;
			else if(x[i] >= 0.6) eye[i][1]++;
			else if(x[i] >= 0.2) eye[i][2]++;
			else eye[i][3]++;
		}
	}
	for(int i = 0; i < 4; i++) printf("%d %d\n", eye[0][i], eye[1][i]);
}