#include<iostream>
using namespace std;
int main() {
	double l,r;
	int la,lb,lc,ld,ra,rb,rc,rd;
	la = 0;
	lb = 0;
	lc = 0;
	ld = 0;
	ra = 0;
	rb = 0;
	rc = 0;
	rd = 0;
	while (cin >> l >> r) {
		if (l >= 1.1)la += 1;
		else if (l >= 0.6)lb += 1;
		else if (l >= 0.2)lc += 1;
		else ld += 1;
		if (r >= 1.1)ra += 1;
		else if (r >= 0.6)rb += 1;
		else if (r >= 0.2)rc += 1;
		else rd += 1;
	}
	cout << la << ' ' << ra << endl;
	cout << lb << ' ' << rb << endl;
	cout << lc << ' ' << rc << endl;
	cout << ld << ' ' << rd << endl;

}