#include <bits/stdc++.h>
using namespace std;
int main(void){
    double left,right;
    int leftA,leftB,leftC,leftD,rightA,rightB,rightC,rightD;
    leftA=0;
    leftB=0;
    leftC=0;
    leftD=0;
    rightA=0;
    rightB=0;
    rightC=0;
    rightD=0;
    while (cin>>left>>right) {
        if (left>=1.1) {
            leftA++;
        } else if (left>=0.6 && left<1.1) {
            leftB++;
        } else if (left>=0.2 && left<0.6) {
            leftC++;
        } else if (left<0.2) {
            leftD++;
        }
        if (right>=1.1) {
            rightA++;
        } else if (right>=0.6 && right<1.1) {
            rightB++;
        } else if (right>=0.2 && right<0.6) {
            rightC++;
        } else if (right<0.2) {
            rightD++;
        }
    }
    cout<<leftA<<" "<<rightA<<endl;
    cout<<leftB<<" "<<rightB<<endl;
    cout<<leftC<<" "<<rightC<<endl;
    cout<<leftD<<" "<<rightD<<endl;
}

