n, m = map(int, input().split()) A = list(map(int, input().split())) S = set(A) M = len(S) m = 0 print(M, m)