#include<stdio.h>
int main()
{
	int a[8]={0},i;
	double l,r;
	while(scanf("%lf%lf",&l,&r)>0)
	{
		if(l>=1.1)a[0]++;
		else if(l>=0.6)a[2]++;
		else if(l>=0.2)a[4]++;
		else a[6]++;
		if(r>=1.1)a[1]++;
		else if(r>=0.6)a[3]++;
		else if(r>=0.2)a[5]++;
		else a[7]++;
	}
	for(i=0;i<8;i+=2)
		printf("%d %d\n",a[i],a[i+1]);
	return 0;
}