$eye_data = [[0, 0, 0, 0], [0, 0, 0, 0]]

def check(vision, lr)
  case
  when 1.1 <= vision
    $eye_data[lr][0] += 1
  when 0.6 <= vision
    $eye_data[lr][1] += 1
  when 0.2 <= vision
    $eye_data[lr][2] += 1
  else
    $eye_data[lr][3] += 1
  end
end

readlines.each do |line|
  l, r = line.chomp.split.map(&:to_f)
  check(l, 0)
  check(r, 1)
end

0.upto(3) do |i|
  puts "#{$eye_data[0][i]} #{$eye_data[1][i]}"
end