import java.util.Scanner;

/**
 * Created by nakatsukatakahiro on 2017/06/10.
 */
class Main {



    public static void main(String[] args) {
        boolean[] color = new boolean[8];
        int overer = 0;
        Scanner scanner = new Scanner(System.in);

        int N = Integer.parseInt(scanner.next());

        for (int i = 0; i < N; i++) {
            int tmp = Integer.parseInt(scanner.next());
            if (tmp < 400) {
                color[0] = true;
            } else if (tmp < 800) {
                color[1] = true;
            } else if (tmp < 1200) {
                color[2] = true;
            } else if (tmp < 1600) {
                color[3] = true;
            } else if (tmp < 2000) {
                color[4] = true;
            } else if (tmp < 2400) {
                color[5] = true;
            } else if (tmp < 2800) {
                color[6] = true;
            } else if (tmp < 3200) {
                color[7] = true;
            } else {
                overer++;
            }
        }

        int ans = 0;

        for (int i = 0; i < 8; i++) {
            if (color[i]) {
                ans++;
            }
        }

        if (ans == 0) {
            System.out.println(1 + " " + overer);
        } else {
            int maxAns = ans + overer;
            System.out.println(ans + " " + maxAns);
        }

    }
}

/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz