n, m = list(map(int, input().split())) A = list(map(int, input().split())) X = len(set(A)) if X == 1: print(1, 1) else: print(X, 0)