N, M = map(int, input().split()) A = list(map(int, input().split())) vmax = len(set(A)) if M < N: vmin = 1 else: if N == M and len(set(A)) == 1: vmin = 1 else: vmin = 0 print(vmax, vmin)