#include <bits/stdc++.h>

using namespace std;

typedef vector<int> vi;
typedef vector<vi> vii;
typedef vector<string> vs;
typedef vector<bool> vb;
typedef vector<vb> vbb;
typedef pair<int, int> pii;
typedef long long ll;
typedef unsigned long long ull;

#define all(a)  (a).begin(),(a).end()
#define rall(a) (a).rbegin(), (a).rend()
#define pb push_back
#define mp make_pair

#define loop(i,a,b) for(int i=(a);i<ull(b);++i)
#define rep(i,n) loop(i,0,n)

const double eps = 1e-10;
const double pi  = acos(-1.0);
const double inf = (int)1e8;

int main(){
    double n, m;
    vector<pair<int, int> > v(4);
    while(cin >> n >> m){
        if(1.1 <= n) v[0].first++;
        else if(0.6 <= n && n < 1.1) v[1].first++;
        else if(0.2 <= n && n < 0.6) v[2].first++;
        else  v[3].first++;
        if(1.1 <= m) v[0].second++;
        else if(0.6 <= m && m < 1.1) v[1].second++;
        else if(0.2 <= m && m < 0.6) v[2].second++;
        else  v[3].second++;
    }

    rep(i, 4){
        cout << v[i].first << " " << v[i].second << endl;
    }
}