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

int main(){
  double a, b;
  int c[8] = {0};

  while(cin >> a >> b){
    if(a<0.2)
      c[6]++;
    else if(a<0.6)
      c[4]++;
    else if(a<1.1)
      c[2]++;
    else
      c[0]++;
    if(b<0.2)
      c[7]++;
    else if(b<0.6)
      c[5]++;
    else if(b<1.1)
      c[3]++;
    else
      c[1]++;
  }
  cout << c[0] << " " << c[1] << "\n" << c[2] << " " << c[3] << "\n" << c[4] << " " << c[5] << "\n" << c[6] << " " << c[7] << "\n";
  return 0;
}