#include<iostream>
using namespace std;

int main() {
	double l, r;
	int a = 0, b = 0, c = 0, d = 0, e = 0, f = 0, g = 0, h = 0;
	while (cin >> l >> r) {
		if (l >= 1.1) { a++; }
		else if (l >= 0.6&&1.1 > l) { c++; }
		else if (l >= 0.2&&0.6 > l) { e++; }
		else { g++; }

		if (r >= 1.1) { b++; }
		else if (r >= 0.6&&1.1 > r) { d++; }
		else if (l >= 0.2&&0.6 > r) { f++; }
		else { h++; }
	}
	cout << a << " " << b <<'\n'<< c << " " << d << '\n' << e << " " << f <<'\n'
		<<g << " " << h ; 
		return 0;
}