N = int(raw_input()) a = map(int, raw_input().split()) a.sort() if a[len(a) - 1] == a[0]: if a[0] == 2 * (N - 1): print N, 0 else: print 0, N else: for i in xrange(1, N): if a[i - 1] != a[i]: print i, N - i break