from collections import * n,m = map(int,input().split()) a = list(map(int,input().split())) d = defaultdict(list) for i in range(n): d[a[i]].append(i) ma = n for i in range(1,m+1): if len(d[i]) >= 2: ma -= 1 if n == m: s = set(a) if len(s) == 1: mi = 1 else: mi = 0 else: mi = 0 print(ma,mi)