# encoding:utf-8
def main():
	N = int(input())
	scores = list(map(int, input().split()))
	ranges_colored = set([x // 400 for x in scores if x <= 3199])
	n_colored = len(ranges_colored)
	n_free = len([x for x in scores if x >= 3200])
	print(max(n_colored, 1), min(n_free + n_colored, 8))
	
if __name__ == '__main__':
	main()