n = int(input()) an = list(map(int, input().split(' '))) s = sum(an) // (n - 1) t = (4 * n - s) // 2 print(t, n - t)