#!/usr/bin/env python
# coding: utf-8

# In[24]:


N = int(input())
a = list(map(int, input().split()))


# In[25]:


color_list = [rate//100//4 for rate in a]
# print(color_list)
filtered = [x for x in color_list if x < 8]
# print(filtered)
free = len(color_list) - len(filtered)

if len(filtered) == 0:
    print(1, min(free, 8))
else:
    print(len(set(filtered)), min(len(set(filtered)) + free, 8))


# In[ ]:




