#include<iostream>
#include<math.h>
#include<vector>
#include<algorithm>
#include<cstdio>
#include <string>
using namespace std;
 
int main(){
   int al=0,bl=0,cl=0,dl=0;
   int ar=0,br=0,cr=0,dr=0;
   double l,r;
   while(cin>>l>>r){
       if(l>=1.1) al++;
       else if(l>=0.6) bl++;
       else if(l>=0.2) cl++;
       else dl++;

       if(r>=1.1) ar++;
       else if(r>=0.6) br++;
       else if(r>=0.2) cr++;
       else dr++;
   }
   cout<<al<<" "<<ar<<endl;
   cout<<bl<<" "<<br<<endl;
   cout<<cl<<" "<<cr<<endl;
   cout<<dl<<" "<<dr<<endl;
    return 0;
}
