a,b=map(int,input().split()) ns=list(map(int,input().split())) sns=len(set(ns)) if b >= sns: t=max(0,sns-(b-sns)) else: t=b print(min(sns,b),t)