import scala.io.Source.stdin

object Main {

  def count(n:Double,a:Array[Int]) = {
                if(n >= 1.1) a(0) += 1
                else if(n < 1.1 && n >= 0.6) a(1) += 1
                else if(n < 0.6 && n >= 0.2) a(2) += 1
                else if(n < 0.2) a(3) += 1
  }

  def main(args:Array[String]) = {
    val r = new Array[Int](4)
    val l = new Array[Int](4)
    stdin.getLines.foreach { s=>
      val n = s.split(" ").map(_.toDouble)
      count(n(0),r)
      count(n(1),l)
    }
    (0 to 3).foreach { i => println(r(i) + " " + l(i)) }
  }
}