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