class Array
  def +(ary)
    self[0] += ary[0]
    self[1] += ary[1]
    self
  end
end
hash = {"A": [0, 0], "B": [0, 0], "C": [0, 0], "D": [0, 0]}
until (ary = gets) == nil
  eyesight = ary.split.map(&:to_f)
  eyesight.each_with_index do |item, index|
    case
    when item >= 1.1
      hash[:A] += index == 0 ? [1, 0] : [0, 1]
    when item >= 0.6
      hash[:B] += index == 0 ? [1, 0] : [0, 1]
    when item >= 0.2
      hash[:C] += index == 0 ? [1, 0] : [0, 1]
    when item < 0.2
      hash[:D] += index == 0 ? [1, 0] : [0, 1]
    end
  end
end
hash.each {|k, v| puts v.join(" ")}