#include<iostream>
#include<cstdio>
using namespace std;
int main(void)
{
	double l[40]={0},r[40]={0};int A=0,A2=0,B=0,B2=0,C=0,C2=0,D=0,D2=0;
	for(int i=0;i<40;i++)
	{
		scanf("%lf %lf",&l[i],&r[i]);
		if(l[i]>=1.1)
		{
			A=A+1;
		}
		else if(l[i]>=0.6)
		{
			B=B+1;
		}
		else if(l[i]>=0.2)
		{
			C=C+1;
		}
		else
		{
			D=D+1;
		}
		if(r[i]>=1.1)
		{
			A2=A2+1;
		}
		else if(r[i]>=0.6)
		{
			B2=B2+1;
		}
		else if(r[i]>=0.2)
		{
			C2=C2+1;
		}
		else
		{
			D2=D2+1;
		}
	}
	printf("%d %d\n%d %d\n%d %d\n%d %d\n",A,A2,B,B2,C,C2,D,D2);
	return 0;
}
