#include #define rep(i,n) for(int i = 0; i < (n); i++) using namespace std; typedef long long ll; int main(){ cin.tie(0); ios::sync_with_stdio(0); int N; cin >> N; vector X(N), Y(N); rep(i,N) cin >> X[i]; rep(i,N) cin >> Y[i]; int ans = 1e9; rep(i,N) ans = min(ans, X[i] + Y[i]); cout << ans << "\n"; cout << 0 << "\n"; rep(i,N) cout << min(X[i], ans) << "\n"; cout << ans << "\n"; }