package codes;

import FastInput.Scanner;
import java.io.PrintWriter;

public class TaskC {
    public void solve(int testNumber, Scanner sc, PrintWriter out) {
        int n = sc.nextInt();
        int mask = 0;
        boolean ok = false;
        int num = 0;
        while (n-- > 0) {
            int rating = sc.nextInt();
            if (rating >= 1 && rating <= 399) {
                mask |= 1;
            } else if (rating >= 400 && rating <= 799) {
                mask |= 2;
            } else if (rating >= 800 && rating <= 1199) {
                mask |= 4;
            } else if (rating >= 1200 && rating <= 1599) {
                mask |= 8;
            } else if (rating >= 1600 && rating <= 1999) {
                mask |= 16;
            } else if (rating >= 2000 && rating <= 2399) {
                mask |= 32;
            } else if (rating >= 2400 && rating <= 2799) {
                mask |= 64;
            } else if (rating >= 2800 && rating <= 3199) {
                mask |= 128;
            } else {
                num++;
                ok = true;
            }
        }
        int res = 0;
        for (int i = 0; i <= 7; i++)
            if ((mask & (1 << i)) != 0) res++;
        out.print(ok ? Math.max(0, res) : res);
        out.println(" " + (ok ? Math.min(8, res + num) : res));
    }
}
