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