#include<iostream>

using namespace std;

int main(){
	 
	double left, right;
	
	int A[2] = {};
	int B[2] = {};
	int C[2] = {};
	int D[2] = {};
	
	while( cin >> left >> right ) {
	
	if( left >= 1.1) A[0] ++;
	if( 0.6 <= left && left < 1.1) B[0] ++;
	if( 0.2 <= left && left < 0.6) C[0] ++;
	if( left < 0.2) D[0] ++;
	
	if( right >= 1.1) A[1] ++;
	if( 0.6 <= right && right < 1.1) B[1] ++;
	if( 0.2 <= right && right < 0.6) C[1] ++;
	if( right < 0.2) D[1] ++;
	
	
}
	cout << A[0] << " " << A[1] << "\n";
	cout << B[0] << " " << B[1] << "\n";
	cout << C[0] << " " << C[1] << "\n";
	cout << D[0] << " " << D[1] << "\n";
  	return 0;
}
