#include <iostream>
using namespace std;

int main() {
  int LA = 0;
  int LB = 0;
  int LC = 0;
  int LD = 0;
  int RA = 0;
  int RB = 0;
  int RC = 0;
  int RD = 0;

  float l, r;
  while(cin >> l) {
    cin >> r;
    if(l >= 1.1) LA++;
    else if(l >= 0.6) LB++;
    else if(l >= 0.2) LC++;
    else LD++;
    if(r >= 1.1) RA++;
    else if(r >= 0.6) RB++;
    else if(r >= 0.2) RC++;
    else RD++;
  }
  cout << LA << ' ' << RA << '\n'
       << LB << ' ' << RB << '\n'
       << LC << ' ' << RC << '\n'
       << LD << ' ' << RD << endl;
  return 0;
}
