#include <iostream>
using namespace std;

int la, lb, lc, ld, ra, rb, rc, rd;
double l[40], r[40];
int n = 0;

int main() {
  
  for(int i=0; cin >> l[i] >> r[i]; i++, n++);
  
  for(int i=0; i<n; i++) {
    if( 1.1 <= l[i] ) la ++;
    if( 0.6 <= l[i] ) lb ++;
    if( 0.2 <= l[i] ) lc ++;
    if( r[i] < 0.2  ) ld ++;
    if( 1.1 <= r[i] ) ra ++;
    if( 0.6 <= r[i] ) rb ++;
    if( 0.2 <= r[i] ) rc ++;
    if( l[i] < 0.2  ) rd ++;
    cout << la << " " << ra << endl;
    cout << lb << " " << rb << endl;
    cout << lc << " " << rc << endl;
    cout << ld << " " << rd << endl;
  }
  
  return 0;
}