#include using namespace std; using int64 = long long; int main(){ int n; cin >> n; vector x(n), y(n); for(int i = 0; i < n; i++){ cin >> x[i]; } for(int i = 0; i < n; i++){ cin >> y[i]; } int64 MIN = x[0] + y[0]; int64 l = 1; for(int i = 1; i < n; i++) MIN = min(MIN, x[i] + y[i]); cout << MIN << endl << l << endl; for(int i = 0; i < n; i++) cout << max(min(l + x[i], l + MIN - y[i]), l - x[i]) << endl; cout << l + MIN << endl; }