#include #define REP(i,n) for(int i=0;i<(int)(n);i++) #define ALL(x) (x).begin(),(x).end() using namespace std; typedef long long ll; typedef long double ld; const ld eps = 1e-9, pi = acos(-1.0); int main() { int N; cin >> N; vector T(N), D(N); REP(i,N) cin >> T[i]; REP(i,N) cin >> D[i]; vector> vec(N); REP(i,N) vec[i] = make_pair(D[i] / T[i], i+1); sort(ALL(vec)); REP(i,N) { if (i > 0) cout << " "; cout << vec[i].second; } cout << endl; return 0; }