#include <iostream>
#include <vector>
#include <algorithm>
#include <cstring>

using namespace std;

#define EPS (1e-10)
#define EQ(a,b) (abs(a-b)<EPS)

int main(){

	double l,r;

	int le[200];
	int re[200];
	memset(le,0,sizeof(le));
	memset(re,0,sizeof(re));

	while(cin>>l>>r){
		if(l>=1.1){
			le['A']++;
		}
		else if((l>0.6||EQ(l,0.6))&&l<1.1){
			le['B']++;
		}
		else if((l>0.2||EQ(l,0.2))&&l<0.6){
			le['C']++;
		}
		else if(l<0.2)
			le['D']++;

		if(EQ(r,1.1)||r>1.1){
			re['A']++;
		}
		else if((r>0.6||EQ(r,0.6))&&r<1.1){
			re['B']++;
		}
		else if((r>0.2||EQ(r,0.2))&&r<0.6){
			re['C']++;
		}
		else if(r<0.2)
			re['D']++;
	}
	for(char i = 'A'; i != 'E'; i++){
		cout<<le[i]<<" "<<re[i]<<endl;
	}

	return 0;
}