N=int(input()) A=list(map(int,input().split())) m=max(A) B=[m-a for a in A] print(B.count(0),B.count(2))