# -*- coding: utf-8 -*-

def main(N, A):
    st = 0
    check = [0]*8
    for i in range(N):
        if(1<=A[i]<=399):
            check[0] = 1
        elif(400<=A[i]<=799):
            check[1] = 1
        elif(800<=A[i]<=1199):
            check[2] = 1
        elif(1200<=A[i]<=1599):
            check[3] = 1
        elif(1600<=A[i]<=1999):
            check[4] = 1
        elif(2000<=A[i]<=2399):
            check[5] = 1
        elif(2400<=A[i]<=2799):
            check[6] = 1
        elif(2800<=A[i]<=3199):
            check[7] = 1
        else:
            st += 1
    cnt = check.count(1)
    if(cnt==0):
        cnt = 1
    print(cnt, min(8, cnt+st))
    
if __name__ == '__main__':
    N = int(input())
    A = [int(a) for a in input().split()]
    
    main(N, A)