n = int(input()) data = list(map(int, input().split())) add, sub, mul, div = map(int, input().split()) max_val = -1e9 min_val = 1e9 def dfs(i, total, add, sub, mul, div): global max_val, min_val if n == i: max_val = max(max_val, total) min_val = min(min_val, total) return else: if add > 0: dfs(i + 1, total + data[i], add - 1, sub, mul, div) if sub > 0: dfs(i + 1, total - data[i], add, sub - 1, m..