/** * @FileName a.cpp * @Author kanpurin * @Created 2020.05.26 00:46:15 **/ #include "bits/stdc++.h" using namespace std; typedef long long ll; int main() { int n;cin >> n; vector,int>> a(n); for (int i = 0; i < n; i++) { cin >> a[i].first.first; } for (int i = 0; i < n; i++) { cin >> a[i].first.second; a[i].second = i + 1; } sort(a.begin(), a.end(), [](pair,int> x, pair,int> y) {return x.first.first * y.first.second > x.first.second * y.first.first;}); for (int i = 0; i < n; i++) { cout << a[i].second << " "; } cout << endl; return 0; }