#include<iostream>
#include<vector>
using namespace std;

int main(){
  double l, r;
  string s;
  vector<int> L(4, 0), R(4, 0);
  while (std::getline(std::cin, s)) {
    sscanf(s.data(), "%lf %lf", &l, &r);
    if(l >= 1.1){
      L[0]++;
    }else if(l >= 0.6){
      L[1]++;
    }else if(l >= 0.2){
      L[2]++;
    }else{
      L[3]++;
    }
    if(r >= 1.1){
      R[0]++;
    }else if(r >= 0.6){
      R[1]++;
    }else if(r >= 0.2){
      R[2]++;
    }else{
      R[3]++;
    }
  }
  for (int i = 0; i < 4; i++) {
    std::cout << L[i] << " " << R[i] << std::endl;
  }
  return 0;
}


