def eye_test(eye, arr)
  case eye
  when 0...0.2
    arr[3] += 1
  when 0.2...0.6
    arr[2] += 1
  when 0.6...1.1
    arr[1] += 1
  else
    arr[0] += 1
  end
  
  return arr
end

l_arr, r_arr = Array.new(4, 0), Array.new(4, 0)

while gets
  l, r = $_.split.map(&:to_f)
  
  l_arr = eye_test(l, l_arr)
  r_arr = eye_test(r, r_arr)
end

4.times do |i|
  puts "#{l_arr[i]} #{r_arr[i]}"
end