#include<bits/stdc++.h>
using namespace std;

int main(){
	double l, r;
	int la=0,lb=0,lc=0,ld=0;
	int ra=0,rb=0,rc=0,rd=0;
	while(cin >> l >> r){
		if(l >= 1.1){
			la++;
		}
		else if(l >= 0.6){
			lb++;
		}
		else if(l >= 0.2){
			lc++;
		}
		else{
			ld++;
		}

		if(r >= 1.1){
			ra++;
		}
		else if(r >= 0.6){
			rb++;
		}
		else if(r >= 0.2){
			rc++;
		}
		else{
			rd++;
		}
	}
	cout << la << " " << ra << endl;
	cout << lb << " " << rb << endl;
	cout << lc << " " << rc << endl;
	cout << ld << " " << rd << endl;
}