#include<bits/stdc++.h>
using namespace std;
int main(){
  double l,r;
  double eye[4]={1.1,0.6,0.2,0.0};
  int ans[8]={0};
  while(cin>>l>>r){
    for(int i=0;i<4;i++){
      if(l>=eye[i]){
	ans[i]++;
	break;
      }
    }
    for(int i=0;i<4;i++){
      if(r>=eye[i]){
	ans[i+4]++;
	break;
      }
    }
  }
  for(int i=0;i<4;i++){
    cout<<ans[i]<<" "<<ans[i+4]<<endl;  
  }
}