#include <iostream>
using namespace std;
int ppl[4][2];

int c(double n){
	if(n>=1.1)return 0;
	if(n>=0.6)return 1;
	if(n>=0.2)return 2;
	return 3;
}

int main(){
	double t,t2;
	while(cin >> t >> t2){	
		ppl[c(t)][0]++;
		ppl[c(t2)][1]++;
	}
	for(int i=0;i<4;i++){
			cout << ppl[i][0] << " " << ppl[i][1] << endl;
	}
}