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

color = ["gray","braun","green","watter","bruee","yellow","orange","red"]

lis = []

count = 0

for i in a:
    if 1 <= i <=399:
        lis.append("gray")
    
    if 400 <= i <= 799:
        lis.append("braun")
    
    if 800 <= i <= 1199:
        lis.append("green")
    
    if 1600 <= i <= 1999:
        lis.append("bruee")

    if 1200 <= i <= 1599:
        lis.append("watter")
    
    if 2000 <= i <= 2399:
        lis.append("yellow")
    
    if 2400 <= i <= 2799:
        lis.append("orange")

    if 2800 <= i <= 3199:
        lis.append("red")
    if 3200 <= i:
        count = count + 1

mincase = len(set(lis))
maxcase = len(set(lis)) + count

print(mincase , '', maxcase)
