n = gets
a1 = 0
b1 = 0
c1 = 0
d1 = 0

a2 = 0
b2 = 0
c2 = 0
d2 = 0
until n.nil?
    x = n.split(" ")
    s = x[0].to_f
    t = x[1].to_f
    
    if s >= 1.1
        a1 += 1
    elsif s >= 0.6
        b1 += 1
    elsif s >= 0.2
        c1 += 1
    elsif s < 0.2
        d1 += 1
    end

    if t  >= 1.1
        a2 += 1
    elsif t >= 0.6
        b2 += 1
    elsif t >= 0.2
        c2 += 1
    elsif t < 0.2
        d2 += 1
    end

    n = gets
end
puts "#{a1} #{a2}"
puts "#{b1} #{b2}"
puts "#{c1} #{c2}"
puts "#{d1} #{d2}"
