#include<bits/stdc++.h>
using namespace std;

// A:0
// B:1
// C:2
// D:3
int rank(double eyeSight){
	if( 1.1 <= eyeSight ){
		return 0;
	}else if(0.6 <= eyeSight){
		return 1;
	}else if(0.2 <= eyeSight){
		return 2;
	}else{
		return 3;
	}
}

main(){
	int lCount[4]={0,0,0,0};
	int rCount[4]={0,0,0,0};

	double l, r;
	while(cin>>l>>r){
		lCount[rank(l)]++;
		rCount[rank(r)]++;
	}
	
	for(int i=0; i<4; ++i){
		printf("%d %d\n",lCount[i],rCount[i]);
	}
}
