#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cassert>
#include <vector>
#include <string>
#include <cmath>
#include <map> 
#include <sstream>
#include <cstdio>
using namespace std;
 
const int MAX= 10000100;

#define loop(i,a,b) for(int i = a ; i < b ; i ++)
#define rep(i,a) loop(i,0,a)
#define all(a) (a).begin(),(a).end()
#define ll long long int
#define gcd(a,b) __gcd(a,b)
#define pb(a) push_back(a)
int GCD(int a, int b) {if(!b) return a; return gcd(b, a%b);}
int lcm(int a, int b) {return a*b / gcd(a, b);}

int main(void){
  double l,r;
  int res[4][2] = {0};
  while(cin>>l>>r){
    if(l >= 1.1){
      res[0][0] ++;
    }else if(l >= 0.6){
      res[1][0] ++;
    }else if(l >= 0.2){
      res[2][0] ++;
    }else{
      res[3][0] ++;
    }
    if(r >= 1.1){
      res[0][1] ++;
    }else if(r >= 0.6){
      res[1][1] ++;
    }else if(r >= 0.2){
      res[2][1] ++;
    }else{
      res[3][1] ++;
    }
  }
  for(int i = 0 ; i < 4 ; i ++){
    cout<<res[i][0]<<" "<<res[i][1];
    cout<<endl;
  }

}