#coding:utf-8 N=input() foot=map(int,raw_input().split()) turu=0 kame=0 for i in range(N): if len(set(foot))==1: ans=foot[i]/(N-1) if ans==2: turu+=1 else: kame+=1 else: if foot[i]==max(set(foot)): turu+=1 else: kame+=1 print turu,kame