#include <iostream>

int main() {
  float l, r;

  int a_l = 0;
  int a_r = 0;
  int b_l = 0;
  int b_r = 0;
  int c_l = 0;
  int c_r = 0;
  int d_l = 0;
  int d_r = 0;

  while (std::cin >> l >> r) {
    if (1.1 <= l) {
      ++a_l;
    } else if (0.6 <= l) {
      ++b_l;
    } else if (0.2 <= l) {
      ++c_l;
    } else {
      ++d_l;
    }

    if (1.1 <= r) {
      ++a_r;
    } else if (0.6 <= r) {
      ++b_r;
    } else if (0.2 <= r) {
      ++c_r;
    } else {
      ++d_r;
    }
  }

  std::cout << a_l << " " << a_r << std::endl;
  std::cout << b_l << " " << b_r << std::endl;
  std::cout << c_l << " " << c_r << std::endl;
  std::cout << d_l << " " << d_r << std::endl;
  return 0;
}

