#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,ser[3]={0.2,0.4,0.5};
    while(cin>>lef>>righ){
        int rc=0,lc=0;
        for(int i=0;i<3&&(!rc||!lc);i++){
            lef-=ser[i];righ-=ser[i];
            if(lef<0&&!lc){
                lc++;
                leye[i]++;
            }
            if(righ<0&&!rc){
                rc++;
                reye[i]++;
            }
        }
        if(!lc)leye[3]++;
        if(!rc)reye[3]++;
    }
    for(int i=3;i>-1;i--)cout<<leye[i]<<" "<<reye[i]<<endl;
}