
#include<iostream>
#include<string>
#include<cmath>
#include<vector>
#include<stack>
#include<queue>
#include<algorithm>
#include<complex>
using namespace std ;
typedef vector<int> vi ;
typedef vector<vi> vvi ;
typedef vector<string> vs ;
typedef pair<int, int> pii; 
typedef long long ll ;

#define loop(i,a,b) for(int i = a ; i < b ; i ++)
#define rep(i,a) loop(i,0,a)
#define all(a) (a).begin(),(a).end()
int main(void){
  double r,l;
    vi re(4,0);
    vi le(4,0);
    while(cin>>r>>l){
    if(r>=1.1)re[0]++;
    else if(r>=0.6)re[1]++;
    else if(r>=0.2)re[2]++;
    else if(r>=0)re[3]++;

    if(l>=1.1)le[0]++;
    else if(l>=0.6)le[1]++;
    else if(l>=0.2)le[2]++;
    else if(l>=0)le[3]++;


  }
  
  rep(i,4)
    cout<<re[i]<<" "<<le[i]<<endl;

}