#include using namespace std; using int64 = long long; int main(){ int n; cin >> n; assert(1 <= n && n <= 100000); vector x(n), y(n); for(int i = 0; i < n; i++){ cin >> x[i]; assert(0 <= x[i] && x[i] <= 1000000); } for(int i = 0; i < n; i++){ cin >> y[i]; assert(0 <= y[i] && y[i] <= 1000000); } int64 MIN = x[0] + y[0]; int64 l = 1e17; 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; }