N, M = map(int, input().split()) A = list(map(int, input().split())) vmax = len(set(A)) print(vmax, 0)