#include<iostream>

int cnt[2][4];
const double b[] = { 1.1, 0.6, 0.2 };

int main()
{
	double e[2];
	while( std::cin >> e[0] >> e[1] )
	{
		for( int i = 0; i != 2; ++i )
		{
			int cls;
			for( cls = 0; cls != 4; ++cls )
			{
				if( !cls && e[i] >= b[0] )
					break;
				else if( cls == 3 && e[i] < b[2] )
					break;
				else if( e[i] >= b[cls] && e[i] < b[cls-1] )
					break;
			}

			++cnt[i][cls];
		}
	}

	for( int i = 0; i != 4; ++i )
	{
		for( int j = 0; j != 2; ++j )
			std::cout << cnt[j][i] << ( j ? "" : " " );

		std::cout << std::endl;
	}

	return 0;
}