#include <cstdio>
#include <cstring>
#include <algorithm>
#include <string>
#include <cmath>
#include <stack>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <list>
#include <iostream>
#include <sstream>
#include <climits>
#include <cfloat>
#include <complex>


typedef long long ll;
const double Eps = 1e-6;

using namespace std;

int main()
{
	double t[] = { 1.1, 0.6, 0.2, 0 };
	int n[8];
	memset(n, 0, sizeof(n));
	double e[2];
	while (scanf("%lf %lf", e, e+1) != EOF)
	{
		for (int i = 0; i < 2; ++i)
		{
			int j;
			for (j = 0; e[i] < t[j]; ++j)
				;
			++n[i*4 + j];
		}
	}
	for (int i = 0; i < 4; ++i)
		printf("%d %d\n", n[i], n[4 + i]);

	return 0;
}