#include<bits/stdc++.h>
using namespace std;
int main()
{
    int leye[4]={0,0,0,0},reye[4]={0,0,0,0};
    double lef,righ;
    while(cin>>lef>>righ){
        if(lef==0.1)leye[0]++;
        else if(lef<0.5)leye[1]++;
        else if(lef<1.1)leye[2]++;
        else leye[3]++;
        if(righ==0.1)reye[0]++;
        else if(righ<0.5)reye[1]++;
        else if(righ<1.1)reye[2]++;
        else reye[3]++;
    }
    for(int i=3;i>-1;i--)cout<<leye[i]<<" "<<reye[i]<<endl;
}