colors = {"hai": False,
          "cha": False,
          "midori": False,
          "mizu": False,
          "ao": False,
          "ki": False,
          "daidai": False,
          "aka": False}
i2c = [None]*3200
for i in range(3200):
    if i < 400:
        i2c[i] = "hai"
    elif i < 800:
        i2c[i] = "cha"
    elif i < 1200:
        i2c[i] = "midori"
    elif i < 1600:
        i2c[i] = "mizu"
    elif i < 2000:
        i2c[i] = "ao"
    elif i < 2400:
        i2c[i] = "ki"
    elif i < 2800:
        i2c[i] = "daidai"
    else:
        i2c[i] = "aka"
n = int(input())
rates = [int(i) for i in input().split()]
jiyu = 0
for x in rates:
    if x >= 3200:
        jiyu += 1
    else:
        colors[i2c[x]] = True
saisho = 0
# print(jiyu, colors)
for x in colors:
    if(colors[x]):
        saisho += 1
print(saisho, saisho+jiyu)
