#include <iostream>

using namespace std;

int main(){

	double ar = 0,al = 0;
	double br = 0,bl = 0;
	double cr = 0,cl = 0;
	double dr = 0,dl = 0;

	double stur,stul;

	for(int i = 1; i <= 40; i++){
		cin >> stul >> stur;

		if(stul == 0) break;

		if(stul >= 1.1){
			al++;
		}else if(stul < 1.1 && 0.6 <= stul){
			bl++;
		}else if(stul < 0.6 && 0.2 <= stul){
			cl++;
		}else if(stul < 0.2){
			dl++;
		}

		if(stur >= 1.1){
			ar++;
		}else if(stur < 1.1 && 0.6 <= stur){
			br++;
		}else if(stur < 0.6 && 0.2 <= stur){
			cr++;
		}else if(stur < 0.2){
			dr++;
		}
	}

	cout << al << " " << ar << endl;
	cout << bl << " " << br << endl;
	cout << cl << " " << cr << endl;
	cout << dl << " " << dr << endl;

	return 0;
}