#include<iostream>
using namespace std;

int main(){
	int cntA[2]={0},cntB[2]={0},cntC[2]={0},cntD[2]={0};
	double right,left;
	while(cin>>left){
		cin>>right;
		if(right>=1.1)cntA[0]++;
		else if(right>=0.6)cntB[0]++;
		else if(right>=0.2)cntC[0]++;
		else cntD[0]++;
		if(left>=1.1)cntA[1]++;
		else if(left>=0.6)cntB[1]++;
		else if(left>=0.2)cntC[1]++;
		else cntD[1]++;
	}
	cout<<cntA[1]<<" "<<cntA[0]<<endl;
	cout<<cntB[1]<<" "<<cntB[0]<<endl;
	cout<<cntC[1]<<" "<<cntC[0]<<endl;
	cout<<cntD[1]<<" "<<cntD[0]<<endl;
	return 0;
}