#include <iostream>
using namespace std;
int seach(double in){
	if(1.1<=in)return 0;
	else if(0.6<=in)return 1;
	else if(0.2<=in)return 2;
	return 3;
}

int main() {
	int r[4]={0},l[4]={0};
	int c=0;
	double rin,lin;
	while(cin>>rin>>lin){
		c++;
		r[seach(rin)]++;
		l[seach(lin)]++;
	//	cout<<seach(rin)<<" "<<seach(lin)<<endl;
	}
	//cout<<endl;
	for(int i=0;i<4;i++){
		cout<<r[i]<<" "<<l[i]<<endl;
	}
	
	return 0;
}