#include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
template<class T>
using Table = vector<vector<T>>;
const ld eps=1e-9;

//// < "D:\D_Download\Visual Studio 2015\Projects\programing_contest_c++\Debug\a.txt" > "D:\D_Download\Visual Studio 2015\Projects\programing_contest_c++\Debug\b.answer"
string to_string_keta(const long long int l, const int keta) {
	ostringstream oss;

	oss << std::setw(keta) << std::setfill('0') << l;

	return oss.str();
}
int getnum(const int a) {
	if (a >= 11)return 0;
	else if (a >= 6)return 1;
	else if (a >= 2)return 2;
	else return 3;
}

int main() {
	ld a, b;
	vector<int>lnum(4);
	vector<int>rnum(4);
	while (cin >> a>>b) {
		a += eps; b += eps;
		a *= 10; b *= 10;
		lnum[getnum(a)]++;

			rnum[getnum(b)]++;
		
	}
	for (int i = 0; i < 4; ++i) {
		cout << lnum[i] << " "<<rnum[i] << endl;
	}
	return 0;
}