#include <iostream>
using namespace std;
#define rep2(x,from,to) for(int x=(from);x<(to);++(x))
#define rep(x,to) rep2(x,0,to)
int main() {
	double a,b,c[] = {0.2, 0.6, 1.1};
	int l[4]= {}, r[4] = {};
	while(cin >> a >> b) {
		bool fa = 1, fb = 1;
		rep(i,4) {
			if(c[i]>a && fa) {
				l[i]++;
				fa = 0;
			}
			if(c[i]>b && fb) {
				r[i]++;
				fb = 0;
			}
		}
		if(fa) l[3]++;
		if(fb) r[3]++;
	}
	rep(i,4) {
		cout << l[3-i] << " " << r[3-i] << endl;
	}
	return 0;
}