#include "bits/stdc++.h" using namespace std; #define DEBUG(x) cout<<#x<<": "< #define vl vector #define vii vector< vector > #define vll vector< vector > #define vs vector #define pii pair #define pis pair #define psi pair #define pll pair #define fi first #define se second #define rep(i,n) for(int i=0;i<(int)(n);i++) #define rep1(i,n) for(int i=1;i<=(int)(n);i++) #define all(c) c.begin(),c.end() const int inf = 1000000001; const ll INF = 2e18; const ll MOD = 1000000007; const ll mod = 1000000009; const double pi = 3.14159265358979323846; #define Sp(p) cout<> n; vector t(n), d(n); rep(i, n) { cin >> t[i]; } rep(i, n) { cin >> d[i]; } vector > a(n); rep(i, n) { a[i].first = t[i] / d[i]; a[i].second = i + 1; } sort(a.begin(), a.end()); for (int i = n - 1; i >= 0; i--) { cout << a[i].second << " "; } cout << endl; }