T = [1.1, 0.6, 0.2]
ls = Array.new 4, 0
rs = Array.new 4, 0
$<.each do |s|
  l, r = s.split.map(&:to_f)
  ls[T.find_index {|x| l >= x } || 3] += 1
  rs[T.find_index {|x| r >= x } || 3] += 1
end
puts [ls, rs].transpose.map {|l, r| "#{l} #{r}" }.join ?\n