#include <bits/stdc++.h>

using namespace std;

int ans[5][10];
double ch[] = {1.1,0.6,0.2,0.1};
double d[3];

int main(){
	int l,r;
//	int la = 0,lb = 0,lc = 0,ld = 0,ra = 0,rb = 0,rc = 0,rd = 0;
	while(cin >> d[0] >> d[1]){
//		if(d[0] + d[1] == 0)break;
		for(int l = 0;l < 2;l++){
			for(int i = 0;i < 4;i++){
				if(d[l] >= ch[i]){
					ans[l][i]++;
					break;
				}
			}
		}
	}
	for(int i = 0;i < 4;i++){
		cout << ans[0][i] << " " <<  ans[1][i] << endl; 
	}
}
