S=range(input());I=lambda:map(float,raw_input().split());T=I();D=I() S.sort(key=lambda x:T[x]/D[x]);print" ".join(str(s+1)for s in S)