#include using namespace std; typedef long long ll; typedef vector vint; typedef pair pint; typedef vector vpint; #define rep(i,n) for(int i=0;i<(n);i++) #define reps(i,f,n) for(int i=(f);i<(n);i++) #define each(it,v) for(__typeof((v).begin()) it=(v).begin();it!=(v).end();it++) #define all(v) (v).begin(),(v).end() #define pb push_back #define mp make_pair #define fi first #define se second #define chmax(a, b) a = (((a)<(b)) ? (b) : (a)) #define chmin(a, b) a = (((a)>(b)) ? (b) : (a)) const int MOD = 1e9 + 7; const int INF = 1e9; int n; double t[10010], d[10010]; bool asc(const int& l, const int& r) { double a = t[l] * (d[l] * 0.5 + d[r] + 1.0) + t[r] * (d[r] * 0.5 + 1.0); double b = t[r] * (d[r] * 0.5 + d[l] + 1.0) + t[l] * (d[l] * 0.5 + 1.0); if(a < b) return false; else return true; } vector ans; int main(void){ cin >> n; rep(i, n) cin >> t[i]; rep(i, n) cin >> d[i]; rep(i, n) ans.push_back(i); sort(all(ans), asc); rep(i, n){ printf("%d ", ans[i] + 1); } printf("\n"); return 0; }