#include<iostream>
using namespace std;
int main(){
	double r,l;
	int eyesight[4][2];
	for(int i=0; i<4; i++){
		eyesight[i][0]=0;
		eyesight[i][1]=0;
	}
	
	while(cin >> r >> l){
		if(r >= 1.1)
			eyesight[0][0]++;
		if(l >= 1.1)
			eyesight[0][1]++;
		if(r >= 0.6 && r < 1.1)
			eyesight[1][0]++;
		if(l >= 0.6 && l < 1.1)
			eyesight[1][1]++;
		if(r >= 0.2 && r < 0.6)
			eyesight[2][0]++;
		if(l >= 0.2 && l < 0.6)
			eyesight[2][1]++;
		if(r < 0.2)
			eyesight[3][0]++;
		if(l < 0.2)
			eyesight[3][1]++;
	}
	
	for(int i=0; i<4; i++){
		cout << eyesight[i][0] << " " << eyesight[i][1] << endl;
	}
	return 0;
}