#include <stdio.h>

int main( ) {

	double eye[ 40 ][ 2 ]; 
	int num = 0;
	int lr_change = 0;
	int al=0;
	int ar=0;
	int bl=0;
	int br=0;
	int cl=0;
	int cr=0;
	int dl=0;
	int dr=0;

	while( 1 ) {

		scanf("%lf",& eye[ num ][lr_change] );

		if( eye[ num ][lr_change] == -1) {
			break;
		}

		if( eye[ num ][lr_change] >= 1.1 ) {
			if( lr_change == 0 ){
				al++;
			}else{
				ar++;
			}
		}else if( 0.6 <= eye[ num ][lr_change] && eye[ num ][lr_change] < 1.1 ){
			if( lr_change == 0 ){
				bl++;
			}else{
				br++;
			}
		}else if( 0.2 <= eye[ num ][lr_change] && eye[ num ][lr_change] < 0.6 ){
			if( lr_change == 0 ){
				cl++;
			}else{
				cr++;
			}
		}else if( eye[ num ][lr_change] < 0.2 ){
			if( lr_change == 0 ){
				dl++;
			}else{
				dr++;
			}
		}

		if( lr_change == 0 ) {
			lr_change = 1;
		}else{
			num++;
			lr_change = 0;
		}

	}

	printf("%d %d\n",al,ar);
	printf("%d %d\n",bl,br);
	printf("%d %d\n",cl,cr);
	printf("%d %d\n",dl,dr);

	return 0;
}