#include <iostream>
using namespace std;
int main(){
	const double REF[]={0.0,0.2,0.6,1.1};
	double l,r;
	int a[4]={0},b[4]={0};
	while(cin>>l>>r){
		for(int i=3;i>=0;--i){
			if(REF[i]<=l){
				a[i]++;
				break;
			}
		}
		for(int i=3;i>=0;--i){
			if(REF[i]<=r){
				b[i]++;
				break;
			}
		}
	}
	for(int i=3;i>=0;--i){
	cout<<a[i]<<" "<<b[i]<<"\n";
	}
	return 0;
}