#include<iostream>
using namespace std;

int main(){

	int cnt[4][4] = {0};
	double l, r, sight[5];

	sight[0] = 2.0;
	sight[1] = 1.1;
	sight[2] = 0.6;
	sight[3] = 0.2;
	sight[4] = 0.0;

	while(cin >> l >> r){
		for(int i=0; i<4; i++){
			if(sight[i+1] < l && l <= sight[i]){
				cnt[0][i]++;
			}
			if(sight[i+1] < r && r <= sight[i]){
				cnt[1][i]++;
			}
		}
	}

	for(int i=0; i<4; i++){
		cout << cnt[0][i] << " " << cnt[1][i] << endl;
	}

	return 0;

}