#include <vector>
#include <algorithm>
#include <string>
#include <map>
#include <set>
#include <queue>
#include <cstring>
#include <deque>
#include <cstdio>
#include <cmath>
#include <complex>
#include <iostream>
#include <iterator>

using namespace std;

#define reep(i,f,t) for(int i=f ; i<int(t) ; ++i)
#define rep(i,n) reep(i, 0, n) 

typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int,int> pii;

typedef vector<double> vd;
typedef vector<vd> vvd;

int main()
{
	double s[2];
	int num[2][4] = {{0}};
	while(scanf("%lf%lf", &s[0], &s[1]) != EOF){
		const double bound[] = {0.2, 0.6, 1.1};
		rep(i, 2)
			num[i][upper_bound(bound, bound+3, s[i])-bound]++;
	}
	rep(i, 4)
		printf("%d %d\n", num[0][3-i], num[1][3-i]);

	return 0;
}