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

int main() {
  double l, r;

  int al = 0, ar = 0;
  int bl = 0, br = 0;
  int cl = 0, cr = 0;
  int dl = 0, dr = 0;
  while(cin >> l >> r) {
    if(l >= 1.1) al++;
    else if(l >= 0.6) bl++;
    else if(l >= 0.2) cl++;
    else dl++;

    if(r >= 1.1) ar++;
    else if(r >= 0.6) br++;
    else if(r >= 0.2) cr++;
    else dr++;
  }

  cout << al << " " << ar << endl;
  cout << bl << " " << br << endl;
  cout << cl << " " << cr << endl;
  cout << dl << " " << dr << endl;
  return 0;
}

