l_ary = 4.times.map{0}
r_ary = 4.times.map{0}
while line = gets
l,r = line.split.map(&:to_f)
  if l >= 1.1
      l_ary[0] += 1
      elsif l >= 0.6
      l_ary[1] += 1
      elsif l >= 0.2
      l_ary[2] += 1
    elsif l < 0.2
    l_ary[3] += 1
  end
  
  if r >= 1.1
    r_ary[0] += 1
    elsif r >= 0.6
    r_ary[1] += 1
    elsif r >= 0.2
    r_ary[2] += 1
  elsif r < 0.2
  r_ary[3] += 1
  end
end
result = []

for i in 0..3
result.push([l_ary[i],r_ary[i]])
end

result.each do |v|
  puts v.join(" ")
end
