n = int(input())
a = list(map(int,input().split()))
kind = []
var = 0

def d_color(num):
     if 1<=num and num<=399:
         return "a"
     elif 400<=num and num<=799:
         return "b"
     elif 800<=num and num<=1199:
         return "c"
     elif 1200<=num and num<=1599:
         return "d"
     elif 1600<=num and num<=1999:
         return "e"
     elif 2000<=num and num<=2399:
         return "f"
     elif 2400<=num and num<=2799:
         return "g"
     else:
         return "h"

for i in range(n):
    if a[i]<3200:
        kind.append(d_color(a[i]))
    else:
        var += 1

kind = list(set(kind))

MAX ,MIN = len(kind),len(kind)+var

print(MIN,MAX)