#include<iostream>
using namespace std;

int EyeTest(float num){
	if(1.1 <= num) return 0;
	else if(0.6 <= num) return 1;
	else if(0.2 <= num) return 2;
	else return 3;
}

int main(){
	float n, m;
	int ans[2][4];
	for(int i=0; i < 2; i++){
		for(int j=0; j < 4; j++) ans[i][j] = 0;
	}
	while(cin >> n >> m){
		ans[0][EyeTest(n)]++;
		ans[1][EyeTest(m)]++;
	}
	for(int i=0; i < 4; i++){
		cout << ans[0][i] << ' ' << ans[1][i] << endl;
	}
}