N = int(input()) a = [int(i) for i in input().split()] s = sum(a)//2 r = {"tsuru": 0, "kame": 0} for ai in a: if s - ai == 2: r["tsuru"] += 1 else: r["kame"] += 1 print(r["tsuru"], r["kame"])