#include<iostream>
using namespace std;



int l[4],r[4];
double a[4]={1.1,0.6,0.2,0.1};

int main(){
	double x,y;
	while(cin>>x>>y){
		for(int i=0;i<4;i++){
			if(a[i]<=x){
				l[i]++;
				break;
			}
		}
		for(int i=0;i<4;i++){
			if(a[i]<=y){
				r[i]++;
				break;
			}
		}
	}
	for(int i=0;i<4;i++){
		cout<<l[i]<<' '<<r[i]<<endl;
	}
	return 0;
}