#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <algorithm>
#include <numeric>
#include <cstring>
#include <cmath>

using namespace std;

int main(int argc, char *argv[]) {
  double l, r;
  int left[4] = {0};
  int right[4] = {0};
  while (cin >> l >> r) {
    if (l >= 1.1)
      left[0]++;
    else if (l >= 0.6)
      left[1]++;
    else if (l >= 0.2)
      left[2]++;
    else
      left[3]++;

    if (r >= 1.1)
      right[0]++;
    else if (r >= 0.6)
      right[1]++;
    else if (r >= 0.2)
      right[2]++;
    else
      right[3]++;
  }

  for (int i = 0; i < 4; i++)
    cout << left[i] << ' ' << right[i] << endl;
  return 0;
}