#include #include #include using namespace std; template istream& operator >> (istream& is, vector& vec){for(T& c: vec) is >> c;return is;} template ostream& operator << (ostream& os, vector& vec){for(int i=0; i> n; vector t(n),d(n); cin >> t >> d; vector ans(n); iota(ans.begin(), ans.end(), 0); sort(ans.begin(), ans.end(), [&](const int& x, const int& y){return t[x]*d[y] > t[y]*d[x];}); for(int& v: ans) v++; cout << ans; return 0; }