N,M = map(int,input().split()) A = list(map(int,input().split())) max,min = 0,0 ans = set() for i in A: if i <= M: ans.add(i) if N == M and len(ans) == 1: min = 1 max = len(ans) print(max,min)