# -*- coding:utf-8 -*- if __name__ == "__main__": n = input() a = map(int,raw_input().split()) num = list(set(a)) num.sort() if len(num) == 1: if num[0] / (n-1) == 4: print "%d %d" % (0,n) else: print "%d %d" % (n,0) else: print "%d %d" % (a.count(num[0]),a.count(num[1]))