#include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<vector>
#include<cmath>
#include<cstring>
#include<cstdio>
#include<time.h>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define pb push_back
#define mp make_pair
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
const double EPS=1e-10;
using namespace std;
typedef long long ll;
typedef vector<int> vi;
int main(){
	double h[4]={0.2,0.6,1.1,30};
	vector<int>r(4);
	vector<int>l(4);
	double a,b;
	while(cin>>a>>b){
		rep(i,4)if(a<h[i]){l[i]++;break;}
		rep(i,4)if(b<h[i]){r[i]++;break;}
	}
	rep(i,4)cout<<l[3-i]<<" "<<r[3-i]<<endl;
}