#include <iostream>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
int main(){
	double a,b;
	int c[2][4]={0};
	while(cin >> a >> b){
		c[0][a>=1.1?0:a>=0.6?1:a>=0.2?2:3]++;
		c[1][b>=1.1?0:b>=0.6?1:b>=0.2?2:3]++;
	}
	rep(i,4)
		cout << c[0][i] << " " << c[1][i] << endl;
}