n=int(input())
a=list(map(int,input().split()))
b=1
c=1
d=0
if a[1]>=3200:
    
    b-=1
for i in range(n-1):
        

    for j in range(n):
        if a[i+1]>=3200:
            d+=1
            break
        if a[i]-a[j]>=400 or a[j]-a[i]>=400:
            pass
            
            
        else:
            break
    b+=1

c=b
if c+d>=8:
    print(b,8)
else:
    print(b,c+d)            





        
    


