#include<iostream>

using namespace std;

int main()
{
	double right,left;
	int A , B , C , D;
	int a , b , c , d;
	
	A = B = C = D = 0;
	a = b = c = d = 0;
	
	while(cin>>left>>right){
		if(left >= 1.1){
			A++;
		}
		else if(left < 1.1 && left >= 0.6){
			B++;
		}
		else if(left < 0.6 && left >= 0.2){
			C++;
		}
		else{
			D++;
		}
		
		if(right >= 1.1){
			a++;
		}
		else if(right < 1.1 && right >= 0.6){
			b++;
		}
		else if(right < 0.6 && right >= 0.2){
			c++;
		}
		else{
			d++;
		}
	}
	
	printf("%d %d\n",A,a);
	printf("%d %d\n",B,b);
	printf("%d %d\n",C,c);
	printf("%d %d\n",D,d);
	
}