#include <bits/stdc++.h>

#define loop(v, f, l) for(int v = (f), v##_ = (l); v < v##_; ++v)

using namespace std;

typedef long long int lint;
static inline int in(){ int x; scanf("%d", &x); return (x); }
static inline lint inl(){ lint x; scanf("%lld", &x); return (x); }

int getRank(float value)
{
	if( value >= 1.1 ) return 0;
	else if( value >= 0.6 ) return 1;
	else if( value >= 0.2 ) return 2;
	else return 3;
}

int main()
{
	int leftRank[4] = {0};
	int rightRank[4] = {0};
	float left, right;
	while( scanf("%f%f", &left, &right) != EOF )
	{
		leftRank[getRank(left)]++;
		rightRank[getRank(right)]++;
	}
	for(int i = 0; i < 4; i++)
	{
		printf("%d %d\n", leftRank[i], rightRank[i]);
	}
	return (0);
}