#include <bits/stdc++.h>
using namespace std;

#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,n) FOR(i,0,n)
#define INF (1<<29)

int main() {
	double rank[4] = {INF, 1.1, 0.6, 0.2};
	
	double in[2];
	int ans[2][4] = {};
	while (cin >> in[0] >> in[1]) {
		REP(i, 2) {
			int g = 0;
			REP(j, 4) if (in[i] < rank[j]) g++;
			ans[i][g - 1]++;
		}
	}
	
	REP(i, 4) printf("%d %d\n", ans[0][i], ans[1][i]);
	return 0;
}