#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cmath>
#include<math.h>
#include<string>
#include<string.h>
#include<stack>
#include<queue>
#include<vector>
#include<utility>
#include<set>
#include<map>
#include<stdlib.h>
#include<iomanip>

using namespace std;

#define ll long long
#define ld long double
#define EPS 0.0000000001
#define INF 1e9
#define rep(i,n) for(i=0;i<n;i++)
#define loop(i,a,n) for(i=a;i<n;i++)
#define all(in) in.begin(),in.end()
#define shosu(x) fixed<<setprecision(x)

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

int main(void) {
  int i,j;
  double a[2];
  vector<vi> n(4,vi(2,0));
  while(scanf("%lf %lf",&a[0],&a[1])!=EOF){
    rep(i,2)
      if(a[i]>=1.1)n[0][i]++;
      else if(a[i]>=0.6)n[1][i]++;
      else if(a[i]>=0.2)n[2][i]++;
      else n[3][i]++;
  }
  rep(i,4)
    cout<<n[i][0]<<" "<<n[i][1]<<endl;
}