
#include <iostream>
#include<string>
#include<cstdio>
#include<cmath>
#include<algorithm>
#include<vector>
using namespace std;
int main(){
    float i,r;
    int Acount=0,Bcount=0,Ccount=0,Dcount=0,acount=0,bcount=0,ccount=0,dcount=0;
    while(cin>>i>>r){
        if(i>=1.1)Acount++;
        else if(i>=0.6&&i<1.1)Bcount++;
        else if(i>=0.2&&i<0.6)Ccount++;
        else if(i<0.2)Dcount++;
        if(r>=1.1)acount++;
        else if(r>=0.6&&r<1.1)bcount++;
        else if(r>=0.2&&r<0.6)ccount++;
        else if(r<0.2)dcount++;
    }
    cout<<Acount<<" "<<acount<<endl;
    cout<<Bcount<<" "<<bcount<<endl;
    cout<<Ccount<<" "<<ccount<<endl;
    cout<<Dcount<<" "<<dcount<<endl;
    return 0;
}