#include #include #include using namespace std; int main() { int k; cin >> k; vector> d(k); for(auto& x : d) cin >> x.second; for(auto& x : d) cin >> x.first; sort(begin(d), end(d)); int T = 0, ans = 0; for(auto [s, t] : d) if(s > 0) ans = max(ans, (t + s - 1) / s); cout << ans << endl; }