#include<bits/stdc++.h>
using namespace std;
int main(){
	double a,b;
	int A=0,B=0,C=0,D=0;
	int rA=0,rB=0,rC=0,rD=0;
	
	while(cin>>a>>b){
		if(a>=1.1){
			A++;
		}else if(a>=0.6){
			B++;
		}else if(a>=0.2){
			C++;
		}else{
			D++;
		}
		if(b>=1.1){
			rA++;
		}else if(b>=0.6){
			rB++;
		}else if(b>=0.2){
			rC++;
		}else{
			rD++;
		}
	}
		printf("%d %d\n",A,rA);
		printf("%d %d\n",B,rB);
		printf("%d %d\n",C,rC);
		printf("%d %d\n",D,rD);
}
