#include <iostream>
using namespace std;

int getResult(double x){
  if(x >= 1.1) return 0;
  if(x >= 0.6) return 1;
  if(x >= 0.2) return 2;
  return 3;
}

int main(){
  double L, R;
  int l[4] = {0};
  int r[4] = {0};

  while(cin >> L >> R){
    l[getResult(L)]++;
    r[getResult(R)]++;
  }

  for(int i = 0; i < 4; i++){
    cout << l[i] << " " << r[i] << endl;
  }
}