#include <bits/stdc++.h>
using namespace std;

#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define REP(i, n) for (int i = 0; i < (n); i++)

int s[8];
int main()
{

  REP(i, 40){
    double a, b;
    cin >> a >> b;
    if (a >= 1.1) s[0]++;
    else if (a >= 0.6) s[1]++;
    else if (a >= 0.2) s[2]++;
    else s[3]++;
    if (b >= 1.1) s[4]++;
    else if (b >= 0.6) s[5]++;
    else if (b >= 0.2) s[6]++;
    else s[7]++;
  }
  REP(i, 4) cout << s[i] << " " << s[i + 4] << endl;
}