#pragma GCC optimize "-O3"
#pragma GCC target ("avx")
#define _USE_MATH_DEFINES
#include<bits/stdc++.h>
#define int long long
#define rep(i,n) for(int i=0;i<n;++i)
#define vi vector<int>
#define vvi vector<vi>
#define pb push_back
#define pi pair<int,int>
#define vp vector<pair<int,int>>
#define mp make_pair
#define all(v) (v).begin(),(v).end()
#define fi first
#define se second
#define MEMSET(a) memset(a,0,sizeof(a))
#define inf (1ll<<60)
#define SORT(v) sort(all(v))
#define RSORT(v) sort(all(v),greater<int>())
#define SPEED ios::sync_with_stdio(false);cin.tie(0);cout<<fixed<<setprecision(12)
signed gcd(int a, int b){return b?gcd(b,a%b):a;}
signed lcm(int a, int b){return a*b/gcd(a,b);}
bool isDigit(char c){return '0'<=c&&c<='9';}
template<typename T> void remove(std::vector<T>& vector,unsigned int index){vector.erase(vector.begin()+index);}
//priority_queue<int, vi, greater<int> > que;//æ˜‡é †

using namespace std;

const int mod=1e9+7;


signed main(){
    SPEED;
    vi a(2,0),b(2,0),c(2,0),d(2,0);
    double l,r;
    while(scanf("%lf%lf",&l,&r) != EOF)
    {
        if(1.1<=l)++a[0];
        else if(0.6<=l&&l<1.1)++b[0];
        else if(0.2<=l&&l<0.6)++c[0];
        else ++d[0];

        if(1.1<=r)++a[1];
        else if(0.6<=r&&r<1.1)++b[1];
        else if(0.2<=r&&r<0.6)++c[1];
        else ++d[1];
    }
    cout << a[0] << " " << a[1] << endl;
    cout << b[0] << " " << b[1] << endl;
    cout << c[0] << " " << c[1] << endl;
    cout << d[0] << " " << d[1] << endl;
}

