#include<stdio.h>
#include<string.h>
#include<math.h>
int main(void)
{
	double a,s,d;
	int f[5],g[5],h,i,j;
	for(i=0;i<4;i++){
		f[i]=0;
		g[i]=0;
	}
	while(scanf("%lf %lf",&a,&s)!=EOF){
		if(1.1<=a)	f[0]++;
		else if(0.6<=a)	f[1]++;
		else if(0.2<=a) f[2]++;
		else if(0.2>a) f[3]++;
		if(1.1<=s)	g[0]++;
		else if(0.6<=s)	g[1]++;
		else if(0.2<=s) g[2]++;
		else if(0.2>s) g[3]++;
	}
	for(i=0;i<4;i++)	printf("%d %d\n",f[i],g[i]);
	return 0;
}