# -*- coding: utf-8 -*-
_ = input()
a = list(map(int, input().split()))

#a=[1100, 1900, 2800, 3200, 3200]
rank_set={x//400 for x in a if x < 3200}
cnt_over3200=len(list(filter(lambda x: x>=3200, a)))
ans=len(rank_set)
print('{} {}'.format(ans, min(ans+cnt_over3200, 8)))
