#include<iostream>

using namespace std;

void CheckEyeTest(const double, int&, int&, int&, int&);

int main(){
  int leftA=0, leftB=0, leftC=0, leftD=0, rightA=0, rightB=0, rightC=0, rightD=0;
  double left, right;

  while(cin >> left >> right){
    CheckEyeTest(left, leftA, leftB, leftC, leftD);
    CheckEyeTest(right, rightA, rightB, rightC, rightD);
  }

  cout << leftA << " " << rightA << endl;
  cout << leftB << " " << rightB << endl;
  cout << leftC << " " << rightC << endl;
  cout << leftD << " " << rightD << endl;

  return 0;
}

void CheckEyeTest(const double x, int& a, int& b, int& c, int& d){
  if(x >= 1.1)
    ++a;
  else if(x >= 0.6)
    ++b;
  else if(x >= 0.2)
    ++c;
  else
    ++d;
}