public class Main {
    private static java.util.Scanner scanner = new java.util.Scanner(System.in);

    public static void main(String[] args) {
        int n = scanner.nextInt(), ans = 0, colors[] = new int[9];
        for (int i = 0, temp; i < n; i++)
            if (++colors[temp = Color.getColor(scanner.nextInt()).ordinal()] == 1 && temp != 8)
                ans++;
        System.out.println(Math.max(1, ans) + " " + (ans + colors[8]));
    }

    enum Color {
        GRAY(1, 399),
        BROWN(400, 799),
        GREEN(800, 1199),
        LIGHT_BLUE(1200, 1599),
        BLUE(1600, 1999),
        YELLOW(2000, 2399),
        ORANGE(2400, 2799),
        RED(2800, 3199),
        FREE(3200, 4800);

        int min, max;
        Color(int min, int max) {
            this.min = min;
            this.max = max;
        }

        static Color getColor(int rate) {
            for (Color color : values())
                if (color.min <= rate && rate <= color.max)
                    return color;
            return null;
        }
    }
} public class Main {
    private static java.util.Scanner scanner = new java.util.Scanner(System.in);

    public static void main(String[] args) {
        int n = scanner.nextInt(), ans = 0, colors[] = new int[9];
        for (int i = 0, temp; i < n; i++)
            if (++colors[temp = Color.getColor(scanner.nextInt()).ordinal()] == 1 && temp != 8)
                ans++;
        System.out.println(Math.max(1, ans) + " " + (ans + colors[8]));
    }

    enum Color {
        GRAY(1, 399),
        BROWN(400, 799),
        GREEN(800, 1199),
        LIGHT_BLUE(1200, 1599),
        BLUE(1600, 1999),
        YELLOW(2000, 2399),
        ORANGE(2400, 2799),
        RED(2800, 3199),
        FREE(3200, 4800);

        int min, max;
        Color(int min, int max) {
            this.min = min;
            this.max = max;
        }

        static Color getColor(int rate) {
            for (Color color : values())
                if (color.min <= rate && rate <= color.max)
                    return color;
            return null;
        }
    }
} Main private static java.util.Scanner scanner = new java.util.Scanner(System.in); scanner new java.util.Scanner(System.in) public static void main(String[] args) {
        int n = scanner.nextInt(), ans = 0, colors[] = new int[9];
        for (int i = 0, temp; i < n; i++)
            if (++colors[temp = Color.getColor(scanner.nextInt()).ordinal()] == 1 && temp != 8)
                ans++;
        System.out.println(Math.max(1, ans) + " " + (ans + colors[8]));
    } main {
        int n = scanner.nextInt(), ans = 0, colors[] = new int[9];
        for (int i = 0, temp; i < n; i++)
            if (++colors[temp = Color.getColor(scanner.nextInt()).ordinal()] == 1 && temp != 8)
                ans++;
        System.out.println(Math.max(1, ans) + " " + (ans + colors[8]));
    } int n = scanner.nextInt() n scanner.nextInt() scanner.nextInt scanner ans = 0 ans 0 colors[] = new int[9]; colors new int[9] 9 for (int i = 0, temp; i < n; i++)
            if (++colors[temp = Color.getColor(scanner.nextInt()).ordinal()] == 1 && temp != 8)
                ans++; int i = 0, temp; int i = 0 i 0 temp; temp i < n i n i++ i++ i if (++colors[temp = Color.getColor(scanner.nextInt()).ordinal()] == 1 && temp != 8)
                ans++; if (++colors[temp = Color.getColor(scanner.nextInt()).ordinal()] == 1 && temp != 8)
                ans++; ++colors[temp = Color.getColor(scanner.nextInt()).ordinal()] == 1 && temp != 8 ++colors[temp = Color.getColor(scanner.nextInt()).ordinal()] == 1 ++colors[temp = Color.getColor(scanner.nextInt()).ordinal()] colors[temp = Color.getColor(scanner.nextInt()).ordinal()] colors temp = Color.getColor(scanner.nextInt()).ordinal() temp Color.getColor(scanner.nextInt()).ordinal() Color.getColor(scanner.nextInt()).ordinal Color.getColor(scanner.nextInt()) Color.getColor Color scanner.nextInt() scanner.nextInt scanner 1 temp != 8 temp 8 ans++ ans System.out.println(Math.max(1, ans) + " " + (ans + colors[8])) System.out.println System.out System System.out Math.max(1, ans) + " " + (ans + colors[8]) Math.max(1, ans) + " " + (ans + colors[8]) Math.max(1, ans) Math.max Math 1 ans " " (ans + colors[8]) ans colors[8] colors 8 String[] args args enum Color {
        GRAY(1, 399),
        BROWN(400, 799),
        GREEN(800, 1199),
        LIGHT_BLUE(1200, 1599),
        BLUE(1600, 1999),
        YELLOW(2000, 2399),
        ORANGE(2400, 2799),
        RED(2800, 3199),
        FREE(3200, 4800);

        int min, max;
        Color(int min, int max) {
            this.min = min;
            this.max = max;
        }

        static Color getColor(int rate) {
            for (Color color : values())
                if (color.min <= rate && rate <= color.max)
                    return color;
            return null;
        }
    } Color GRAY(1, 399) GRAY BROWN(400, 799) BROWN GREEN(800, 1199) GREEN LIGHT_BLUE(1200, 1599) LIGHT_BLUE BLUE(1600, 1999) BLUE YELLOW(2000, 2399) YELLOW ORANGE(2400, 2799) ORANGE RED(2800, 3199) RED FREE(3200, 4800) FREE int min min max; max Color(int min, int max) {
            this.min = min;
            this.max = max;
        } Color {
            this.min = min;
            this.max = max;
        } this.min = min this.min this this.min min this.max = max this.max this this.max max int min min int max max static Color getColor(int rate) {
            for (Color color : values())
                if (color.min <= rate && rate <= color.max)
                    return color;
            return null;
        } getColor {
            for (Color color : values())
                if (color.min <= rate && rate <= color.max)
                    return color;
            return null;
        } for (Color color : values())
                if (color.min <= rate && rate <= color.max)
                    return color; Color color values() values if (color.min <= rate && rate <= color.max)
                    return color; if (color.min <= rate && rate <= color.max)
                    return color; color.min <= rate && rate <= color.max color.min <= rate color.min color color.min rate rate <= color.max rate color.max color color.max return color; color return null; null int rate rate public class Main {
    private st public class Main {
    private static java.util.Scanner scanner = new java.util.Scanner(System. public class Main {
    private static java.util.Scanner scanner = new java.util.Scanner(System.in);

    public static void main(String[] args) {
        int n = scanner.nextInt(), ans = 0, colors[] = new int[9];
        for (int i = 0, temp; i < n; i++)
            if (++colors[temp = Color.getColor(scanner.nextInt()).ordinal()] == 1 && temp != 8)
                ans++;
        System.out.println(Math.max(1, ans) + " " + (ans + colors[8]));
    }

    enum Color {
        GRAY(1, 399),
        BROWN(400, 799),
        GREEN(800, 1199),
        LIGHT_BLUE(1200, 1599),
        BLUE(1600, 1999),
        YELLOW(2000, 2399),
        ORANGE(2400, 2799),
        RED(2800, 3199),
        FREE(3200, 4800);

        int min, max;
        Color(int min, int max) {
            this.min = min;
            this.max = max;
        }

        static Color getColor(int rate) {
            for (Color color : values())
                if (color.min <= rate && rate <= color.max)
                    return color;
            return null;
        }
    }
} public class Main {
    private static java.util.Scanner scanner = new java.util.Scanner(System.in);

    public static void main(String[] args) {
        int n = scanner.nextInt(), ans = 0, colors[] = new int[9];
        for (int i = 0, temp; i < n; i++)
            if (++colors[temp = Color.getColor(scanner.nextInt()).ordinal()] == 1 && temp != 8)
                ans++;
        System.out.println(Math.max(1, ans) + " " + (ans + colors[8]));
    }

    enum Color {
        GRAY(1, 399),
        BROWN(400, 799),
        GREEN(800, 1199),
        LIGHT_BLUE(1200, 1599),
        BLUE(1600, 1999),
        YELLOW(2000, 2399),
        ORANGE(2400, 2799),
        RED(2800, 3199),
        FREE(3200, 4800);

        int min, max;
        Color(int min, int max) {
            this.min = min;
            this.max = max;
        }

        static Color getColor(int rate) {
            for (Color color : values())
                if (color.min <= rate && rate <= color.max)
                    return color;
            return null;
        }
    }
} Main
public class Main {
    private static java.util.Scanner scanner = new java.util.Scanner(System.in);

    public static void main(String[] args) {
        int n = scanner.nextInt(), ans = 0, colors[] = new int[9];
        for (int i = 0, temp; i < n; i++)
            if (++colors[temp = Color.getColor(scanner.nextInt()).ordinal()] == 1 && temp != 8)
                ans++;
        System.out.println(Math.max(1, ans) + " " + (ans + colors[8]));
    }

    enum Color {
        GRAY(1, 399),
        BROWN(400, 799),
        GREEN(800, 1199),
        LIGHT_BLUE(1200, 1599),
        BLUE(1600, 1999),
        YELLOW(2000, 2399),
        ORANGE(2400, 2799),
        RED(2800, 3199),
        FREE(3200, 4800);

        int min, max;
        Color(int min, int max) {
            this.min = min;
            this.max = max;
        }

        static Color getColor(int rate) {
            for (Color color : values())
                if (color.min <= rate && rate <= color.max)
                    return color;
            return null;
        }
    }
}