N = int(input()) a = sum(map(int, input().split())) kame = (a - (N - 1) * N * 2) // 2 turu = N - kame print("{:d} {:d}".format(turu, kame))