# yukicoder No.112 ややこしい鶴亀算 2020/02/13 n=int(input()) a=list(map(int,input().split())) mx=max(a) c=0 t=0 for e in a: if e==mx: c+=1 else: t+=1 print(*[c,t])