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