#define _USE_MATH_DEFINES
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <cfloat>
#include <ctime>
#include <cassert>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
#include <numeric>
#include <list>
#include <iomanip>
#include <iterator>
 
using namespace std;
 
typedef long long ll;
typedef pair<int,int> Pii;
typedef pair<ll,ll> Pll;
 
#define FOR(i,n) for(int i = 0; i < (n); i++)
#define sz(c) ((int)c.size())

typedef unsigned long long ull;
const int INF = (int)1e8;


int main(){
	double f[] = {0.2,0.6,1.1};
	double a,b;
	vector<int> v1(4),v2(4);
	while(cin>>a>>b){
		v1[upper_bound(f,f+3,a) - f]++;
		v2[upper_bound(f,f+3,b) - f]++;
	}
	FOR(i,4){
		printf("%d %d",v1[3-i],v2[3-i]);
		if(i!=3)puts("");
	}

	return 0;
}