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