#include<iostream>
#include<cstdio>
#include<algorithm>
#include<climits>
#include<string>
#include<vector>
#include<list>
#include<map>
#include<set>
#include<cmath>
#include<queue>
#include<cstring>
#include<stack>
#include<functional>
using namespace std;

int test(double e){
	if(e<0.2) return 3;
	if(e<0.6) return 2;
	if(e<1.1) return 1;
	else return 0;
}

int main(){
	int ansA[4]={},ansB[4]={};
	double A,B;
	while(cin>>A>>B){
		ansA[test(A)]++; ansB[test(B)]++;
	}
	for(int i=0;i<4;i++) printf("%d %d\n",ansA[i],ansB[i]);
	return 0;
}