#include<iostream>

using namespace std;

int main(){

  int sum[8];
  double r, l;

  for(int i = 0; i < 8; i++) sum[i] = 0;

  while(cin >> r >> l){
    if(r >= 1.1) sum[0]++;
    else if(r >= 0.6)sum[2]++;
    else if(r >= 0.2)sum[4]++;
    else sum[6]++;

    if(l >= 1.1) sum[1]++;
    else if(l >= 0.6)sum[3]++;
    else if(l >= 0.2)sum[5]++;
    else sum[7]++;

  }

  for(int i = 0; i < 8; i+=2){
    cout << sum[i] <<" "<< sum[i+1] <<endl;
  }

  return 0;
}