# -*- coding: utf-8 -*-
"""
Created on Thu May 14 13:29:53 2020

@author: shinba
"""

n = int(input())

data = {}

f = 0

for i in map(int,input().split()):
    if 1 <= i < 400:
        data["gray"] = 1
    elif 400 <= i < 800:
        data["brown"] = 1
    elif 800 <= i < 1200:
        data["green"] = 1
    elif 1200 <= i < 1600:
        data["w"] = 1
    elif 1600 <= i < 2000:
        data["blue"] = 1
    elif 2000 <= i < 2400:
        data["y"] = 1
    elif 2400 <= i < 2800:
        data["o"] = 1
    elif 2800 <= i < 3200:
        data["r"] = 1
    else:
        f += 1

print(min(len(data),1),len(data)+f)