n, m = list(map(int, input().split())) A = list(map(int, input().split())) B = [a for a in A if a <= N] X = len(set(A)) if X == 1: if n == m: print(1, 1) else: print(1, 0) else: print(X, 0)