#include<iostream>
using namespace std;
int x[4][2];double a, b;
int main() {
	while (cin >> a >> b) {
		a *= 10; b *= 10;
		if (a == 1) {
			x[3][0]++;
		}
		else if (a < 6) {
			x[2][0]++;
		}
		else if (a < 11) {
			x[1][0]++;
		}
		else {
			x[0][0]++;
		}
		if (b == 1) {
			x[3][1]++;
		}
		else if (b < 6) {
			x[2][1]++;
		}
		else if (b < 11) {
			x[1][1]++;
		}
		else {
			x[0][1]++;
		}
	}
	cout << x[0][0] << ' ' << x[0][1] << endl;
	cout << x[1][0] << ' ' << x[1][1] << endl;
	cout << x[2][0] << ' ' << x[2][1] << endl;
	cout << x[3][0] << ' ' << x[3][1] << endl;
	return 0;
}