n = int(input())
dat_a = list(map(int, input().split()))
dat = set([])
all_color = 0
for i in range(n):
    if dat_a[i] < 400:
        dat.add("a")
    elif dat_a[i] < 800:
        dat.add("b")
    elif dat_a[i] < 1200:
        dat.add("c")
    elif dat_a[i] < 1600:
        dat.add("d")
    elif dat_a[i] < 2000:
        dat.add("e")
    elif dat_a[i] < 2400:
        dat.add("f")
    elif dat_a[i] < 2800:
        dat.add("g")
    elif dat_a[i] < 3200:
        dat.add("h")
    else:
        all_color += 1
colored = len(dat)

resmax = colored + all_color
if resmax > 8:
    resmax = 8

resmin = colored
if resmin == 0:
    resmin = 1

print("{0} {1}".format(str(resmin), str(resmax)))