#!/usr/bin/python N = int(raw_input()) n = N - 1 summa = sum(map(int, raw_input().split())) x = 2*N - summa/n/2 print '{} {}'.format(x, N-x)