#include<cstring>
#include<iostream>
using namespace std;

int getRank(double x) {
	if (1.1 <= x) return 0;
	if (0.6 <= x) return 1; 
	if (0.2 <= x) return 2;
	return 3;
}

int main() {
	int resutls[4][2];
	double a, b;
	memset(resutls, 0, sizeof(resutls));
	while (cin >> a >> b) {
		resutls[getRank(a)][0]++;
		resutls[getRank(a)][1]++;
	}
	for (int i = 0; i < 4; i++) {
		cout << resutls[i][0] << ' ' << resutls[i][1] << endl;
	}
	return 0;
}