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