a = Array.new(2).map{Array.new(4,0)}
readlines.each do |x|
  b = Array.new(2)
  b[0],b[1] = x.chomp.split(" ").map(&:to_f)
  for i in 0..1
    if b[i]>=1.1
      a[i][0]+=1
    elsif b[i]>=0.6
      a[i][1]+=1
    elsif b[i]>=0.2
      a[i][2]+=1
    else 
      a[i][3]+=1
    end
  end
end
for i in 0..3
  print(a[0][i]," ",a[1][i],"\n")
end
