#include <iostream>

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

int main()
{
	int L[4] = {0,0,0,0}, R[4] = {0,0,0,0};
	float l, r;
	while (std::cin >> l >> r) {
		L[getClass(l)]++; R[getClass(r)]++;
	}
	for (int i=0; i<4; i++) std::cout << L[i] << " " << R[i] << std::endl;
	return 0;
}

