n = int(input()) p = sum(map(int, input().split())) // ((n - 1) * 2) print(2 * n - p, p - n)