#include <iostream>
#include <cstdio>
#include <cstring>
#include <sstream>
#include <algorithm>
#include <math.h>
#include <map>
#include <functional>
#include <iomanip>
#include <vector>
#include <queue>
#include <stack>
#include <set>
#include <typeinfo>
#define PI 3.14159265359
#define INF 99999999
#define rep(i, n) for(int i=0; i<n; i++)
#define REP(n) rep(i, n)
#define pb push_back
#define mp make_pair
typedef long long ll;
using namespace std;
typedef pair<int, int> P;

double l, r;
map<char, int> lleft;
map<char, int> rright;

int main()
{
	while (cin >> l >> r)
	{
		if (l >= 1.1) lleft['A']++;
		else if (l >= 0.6) lleft['B']++;
		else if (l >= 0.2) lleft['C']++;
		else lleft['D']++;

		if (r >= 1.1) rright['A']++;
		else if (r >= 0.6) rright['B']++;
		else if (r >= 0.2) rright['C']++;
		else rright['D']++;
	}

	printf("%d %d\n", lleft['A'], rright['A']);
	printf("%d %d\n", lleft['B'], rright['B']);
	printf("%d %d\n", lleft['C'], rright['C']);
	printf("%d %d\n", lleft['D'], rright['D']);

	return 0;
}