n = gets.to_i
t = gets.split.map(&:to_f)
d = gets.split.map(&:to_f)
puts (1..n).sort_by{|i| d[i - 1] / t[i - 1]} * ' '