
import java.util.Scanner;

public class Main {
    private static final int GRAY = 0;
    private static final int BROWN = 1;
    private static final int GREEN = 2;
    private static final int WATER = 3;
    private static final int BLUE = 4;
    private static final int YELLOW = 5;
    private static final int ORANGE = 6;
    private static final int RED = 7;
    private static final int OTHERS = 8;

    public static void main(final String[] args) {
        final Scanner scanner = new Scanner(System.in);
        final int n = scanner.nextInt();
        final int[] colors = new int[9];
        for (int i = 0; i < n; i++) {
            final int a = scanner.nextInt();
            if (a < 400) {
                colors[GRAY]++;
            } else if (a < 800) {
                colors[BROWN]++;
            } else if (a < 1200) {
                colors[GREEN]++;
            } else if (a < 1600) {
                colors[WATER]++;
            } else if (a < 2000) {
                colors[BLUE]++;
            } else if (a < 2400) {
                colors[YELLOW]++;
            } else if (a < 2800) {
                colors[ORANGE]++;
            } else if (a < 3200) {
                colors[RED]++;
            } else {
                colors[OTHERS]++;
            }
        }

        int min = 0;
        int max;
        for (int i = 0; i <= RED; i++) {
            if (colors[i] > 0) {
                min++;
            }
        }

        max = min + colors[OTHERS];
        min = min == 0 && colors[OTHERS] > 0 ? 1 : min;

        System.out.println(min + " " + max);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    private static final int GRAY = 0;
    private static final int BROWN = 1;
    private static final int GREEN = 2;
    private static final int WATER = 3;
    private static final int BLUE = 4;
    private static final int YELLOW = 5;
    private static final int ORANGE = 6;
    private static final int RED = 7;
    private static final int OTHERS = 8;

    public static void main(final String[] args) {
        final Scanner scanner = new Scanner(System.in);
        final int n = scanner.nextInt();
        final int[] colors = new int[9];
        for (int i = 0; i < n; i++) {
            final int a = scanner.nextInt();
            if (a < 400) {
                colors[GRAY]++;
            } else if (a < 800) {
                colors[BROWN]++;
            } else if (a < 1200) {
                colors[GREEN]++;
            } else if (a < 1600) {
                colors[WATER]++;
            } else if (a < 2000) {
                colors[BLUE]++;
            } else if (a < 2400) {
                colors[YELLOW]++;
            } else if (a < 2800) {
                colors[ORANGE]++;
            } else if (a < 3200) {
                colors[RED]++;
            } else {
                colors[OTHERS]++;
            }
        }

        int min = 0;
        int max;
        for (int i = 0; i <= RED; i++) {
            if (colors[i] > 0) {
                min++;
            }
        }

        max = min + colors[OTHERS];
        min = min == 0 && colors[OTHERS] > 0 ? 1 : min;

        System.out.println(min + " " + max);
    }
} Main private static final int GRAY = 0; GRAY 0 private static final int BROWN = 1; BROWN 1 private static final int GREEN = 2; GREEN 2 private static final int WATER = 3; WATER 3 private static final int BLUE = 4; BLUE 4 private static final int YELLOW = 5; YELLOW 5 private static final int ORANGE = 6; ORANGE 6 private static final int RED = 7; RED 7 private static final int OTHERS = 8; OTHERS 8 public static void main(final String[] args) {
        final Scanner scanner = new Scanner(System.in);
        final int n = scanner.nextInt();
        final int[] colors = new int[9];
        for (int i = 0; i < n; i++) {
            final int a = scanner.nextInt();
            if (a < 400) {
                colors[GRAY]++;
            } else if (a < 800) {
                colors[BROWN]++;
            } else if (a < 1200) {
                colors[GREEN]++;
            } else if (a < 1600) {
                colors[WATER]++;
            } else if (a < 2000) {
                colors[BLUE]++;
            } else if (a < 2400) {
                colors[YELLOW]++;
            } else if (a < 2800) {
                colors[ORANGE]++;
            } else if (a < 3200) {
                colors[RED]++;
            } else {
                colors[OTHERS]++;
            }
        }

        int min = 0;
        int max;
        for (int i = 0; i <= RED; i++) {
            if (colors[i] > 0) {
                min++;
            }
        }

        max = min + colors[OTHERS];
        min = min == 0 && colors[OTHERS] > 0 ? 1 : min;

        System.out.println(min + " " + max);
    } main {
        final Scanner scanner = new Scanner(System.in);
        final int n = scanner.nextInt();
        final int[] colors = new int[9];
        for (int i = 0; i < n; i++) {
            final int a = scanner.nextInt();
            if (a < 400) {
                colors[GRAY]++;
            } else if (a < 800) {
                colors[BROWN]++;
            } else if (a < 1200) {
                colors[GREEN]++;
            } else if (a < 1600) {
                colors[WATER]++;
            } else if (a < 2000) {
                colors[BLUE]++;
            } else if (a < 2400) {
                colors[YELLOW]++;
            } else if (a < 2800) {
                colors[ORANGE]++;
            } else if (a < 3200) {
                colors[RED]++;
            } else {
                colors[OTHERS]++;
            }
        }

        int min = 0;
        int max;
        for (int i = 0; i <= RED; i++) {
            if (colors[i] > 0) {
                min++;
            }
        }

        max = min + colors[OTHERS];
        min = min == 0 && colors[OTHERS] > 0 ? 1 : min;

        System.out.println(min + " " + max);
    } final Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) final int n = scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner final int[] colors = new int[9]; colors new int[9] 9 for (int i = 0; i < n; i++) {
            final int a = scanner.nextInt();
            if (a < 400) {
                colors[GRAY]++;
            } else if (a < 800) {
                colors[BROWN]++;
            } else if (a < 1200) {
                colors[GREEN]++;
            } else if (a < 1600) {
                colors[WATER]++;
            } else if (a < 2000) {
                colors[BLUE]++;
            } else if (a < 2400) {
                colors[YELLOW]++;
            } else if (a < 2800) {
                colors[ORANGE]++;
            } else if (a < 3200) {
                colors[RED]++;
            } else {
                colors[OTHERS]++;
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            final int a = scanner.nextInt();
            if (a < 400) {
                colors[GRAY]++;
            } else if (a < 800) {
                colors[BROWN]++;
            } else if (a < 1200) {
                colors[GREEN]++;
            } else if (a < 1600) {
                colors[WATER]++;
            } else if (a < 2000) {
                colors[BLUE]++;
            } else if (a < 2400) {
                colors[YELLOW]++;
            } else if (a < 2800) {
                colors[ORANGE]++;
            } else if (a < 3200) {
                colors[RED]++;
            } else {
                colors[OTHERS]++;
            }
        } {
            final int a = scanner.nextInt();
            if (a < 400) {
                colors[GRAY]++;
            } else if (a < 800) {
                colors[BROWN]++;
            } else if (a < 1200) {
                colors[GREEN]++;
            } else if (a < 1600) {
                colors[WATER]++;
            } else if (a < 2000) {
                colors[BLUE]++;
            } else if (a < 2400) {
                colors[YELLOW]++;
            } else if (a < 2800) {
                colors[ORANGE]++;
            } else if (a < 3200) {
                colors[RED]++;
            } else {
                colors[OTHERS]++;
            }
        } final int a = scanner.nextInt(); a scanner.nextInt() scanner.nextInt scanner if (a < 400) {
                colors[GRAY]++;
            } else if (a < 800) {
                colors[BROWN]++;
            } else if (a < 1200) {
                colors[GREEN]++;
            } else if (a < 1600) {
                colors[WATER]++;
            } else if (a < 2000) {
                colors[BLUE]++;
            } else if (a < 2400) {
                colors[YELLOW]++;
            } else if (a < 2800) {
                colors[ORANGE]++;
            } else if (a < 3200) {
                colors[RED]++;
            } else {
                colors[OTHERS]++;
            } a < 400 a 400 {
                colors[GRAY]++;
            } colors[GRAY]++ colors[GRAY] colors GRAY if (a < 800) {
                colors[BROWN]++;
            } else if (a < 1200) {
                colors[GREEN]++;
            } else if (a < 1600) {
                colors[WATER]++;
            } else if (a < 2000) {
                colors[BLUE]++;
            } else if (a < 2400) {
                colors[YELLOW]++;
            } else if (a < 2800) {
                colors[ORANGE]++;
            } else if (a < 3200) {
                colors[RED]++;
            } else {
                colors[OTHERS]++;
            } a < 800 a 800 {
                colors[BROWN]++;
            } colors[BROWN]++ colors[BROWN] colors BROWN if (a < 1200) {
                colors[GREEN]++;
            } else if (a < 1600) {
                colors[WATER]++;
            } else if (a < 2000) {
                colors[BLUE]++;
            } else if (a < 2400) {
                colors[YELLOW]++;
            } else if (a < 2800) {
                colors[ORANGE]++;
            } else if (a < 3200) {
                colors[RED]++;
            } else {
                colors[OTHERS]++;
            } a < 1200 a 1200 {
                colors[GREEN]++;
            } colors[GREEN]++ colors[GREEN] colors GREEN if (a < 1600) {
                colors[WATER]++;
            } else if (a < 2000) {
                colors[BLUE]++;
            } else if (a < 2400) {
                colors[YELLOW]++;
            } else if (a < 2800) {
                colors[ORANGE]++;
            } else if (a < 3200) {
                colors[RED]++;
            } else {
                colors[OTHERS]++;
            } a < 1600 a 1600 {
                colors[WATER]++;
            } colors[WATER]++ colors[WATER] colors WATER if (a < 2000) {
                colors[BLUE]++;
            } else if (a < 2400) {
                colors[YELLOW]++;
            } else if (a < 2800) {
                colors[ORANGE]++;
            } else if (a < 3200) {
                colors[RED]++;
            } else {
                colors[OTHERS]++;
            } a < 2000 a 2000 {
                colors[BLUE]++;
            } colors[BLUE]++ colors[BLUE] colors BLUE if (a < 2400) {
                colors[YELLOW]++;
            } else if (a < 2800) {
                colors[ORANGE]++;
            } else if (a < 3200) {
                colors[RED]++;
            } else {
                colors[OTHERS]++;
            } a < 2400 a 2400 {
                colors[YELLOW]++;
            } colors[YELLOW]++ colors[YELLOW] colors YELLOW if (a < 2800) {
                colors[ORANGE]++;
            } else if (a < 3200) {
                colors[RED]++;
            } else {
                colors[OTHERS]++;
            } a < 2800 a 2800 {
                colors[ORANGE]++;
            } colors[ORANGE]++ colors[ORANGE] colors ORANGE if (a < 3200) {
                colors[RED]++;
            } else {
                colors[OTHERS]++;
            } a < 3200 a 3200 {
                colors[RED]++;
            } colors[RED]++ colors[RED] colors RED {
                colors[OTHERS]++;
            } colors[OTHERS]++ colors[OTHERS] colors OTHERS int min = 0; min 0 int max; max for (int i = 0; i <= RED; i++) {
            if (colors[i] > 0) {
                min++;
            }
        } int i = 0; int i = 0; i 0 i <= RED i RED i++ i++ i {
            if (colors[i] > 0) {
                min++;
            }
        } {
            if (colors[i] > 0) {
                min++;
            }
        } if (colors[i] > 0) {
                min++;
            } colors[i] > 0 colors[i] colors i 0 {
                min++;
            } min++ min max = min + colors[OTHERS] max min + colors[OTHERS] min colors[OTHERS] colors OTHERS min = min == 0 && colors[OTHERS] > 0 ? 1 : min min min == 0 && colors[OTHERS] > 0 ? 1 : min min == 0 && colors[OTHERS] > 0 min == 0 min 0 colors[OTHERS] > 0 colors[OTHERS] colors OTHERS 0 1 min System.out.println(min + " " + max) System.out.println System.out System System.out min + " " + max min + " " + max min " " max final String[] args args public class Main {
    private static final int GRAY = 0;
    private static final int BROWN = 1;
    private static final int GREEN = 2;
    private static final int WATER = 3;
    private static final int BLUE = 4;
    private static final int YELLOW = 5;
    private static final int ORANGE = 6;
    private static final int RED = 7;
    private static final int OTHERS = 8;

    public static void main(final String[] args) {
        final Scanner scanner = new Scanner(System.in);
        final int n = scanner.nextInt();
        final int[] colors = new int[9];
        for (int i = 0; i < n; i++) {
            final int a = scanner.nextInt();
            if (a < 400) {
                colors[GRAY]++;
            } else if (a < 800) {
                colors[BROWN]++;
            } else if (a < 1200) {
                colors[GREEN]++;
            } else if (a < 1600) {
                colors[WATER]++;
            } else if (a < 2000) {
                colors[BLUE]++;
            } else if (a < 2400) {
                colors[YELLOW]++;
            } else if (a < 2800) {
                colors[ORANGE]++;
            } else if (a < 3200) {
                colors[RED]++;
            } else {
                colors[OTHERS]++;
            }
        }

        int min = 0;
        int max;
        for (int i = 0; i <= RED; i++) {
            if (colors[i] > 0) {
                min++;
            }
        }

        max = min + colors[OTHERS];
        min = min == 0 && colors[OTHERS] > 0 ? 1 : min;

        System.out.println(min + " " + max);
    }
} public class Main {
    private static final int GRAY = 0;
    private static final int BROWN = 1;
    private static final int GREEN = 2;
    private static final int WATER = 3;
    private static final int BLUE = 4;
    private static final int YELLOW = 5;
    private static final int ORANGE = 6;
    private static final int RED = 7;
    private static final int OTHERS = 8;

    public static void main(final String[] args) {
        final Scanner scanner = new Scanner(System.in);
        final int n = scanner.nextInt();
        final int[] colors = new int[9];
        for (int i = 0; i < n; i++) {
            final int a = scanner.nextInt();
            if (a < 400) {
                colors[GRAY]++;
            } else if (a < 800) {
                colors[BROWN]++;
            } else if (a < 1200) {
                colors[GREEN]++;
            } else if (a < 1600) {
                colors[WATER]++;
            } else if (a < 2000) {
                colors[BLUE]++;
            } else if (a < 2400) {
                colors[YELLOW]++;
            } else if (a < 2800) {
                colors[ORANGE]++;
            } else if (a < 3200) {
                colors[RED]++;
            } else {
                colors[OTHERS]++;
            }
        }

        int min = 0;
        int max;
        for (int i = 0; i <= RED; i++) {
            if (colors[i] > 0) {
                min++;
            }
        }

        max = min + colors[OTHERS];
        min = min == 0 && colors[OTHERS] > 0 ? 1 : min;

        System.out.println(min + " " + max);
    }
} Main

import java.util.Scanner;

public class Main {
    private static final int GRAY = 0;
    private static final int BROWN = 1;
    private static final int GREEN = 2;
    private static final int WATER = 3;
    private static final int BLUE = 4;
    private static final int YELLOW = 5;
    private static final int ORANGE = 6;
    private static final int RED = 7;
    private static final int OTHERS = 8;

    public static void main(final String[] args) {
        final Scanner scanner = new Scanner(System.in);
        final int n = scanner.nextInt();
        final int[] colors = new int[9];
        for (int i = 0; i < n; i++) {
            final int a = scanner.nextInt();
            if (a < 400) {
                colors[GRAY]++;
            } else if (a < 800) {
                colors[BROWN]++;
            } else if (a < 1200) {
                colors[GREEN]++;
            } else if (a < 1600) {
                colors[WATER]++;
            } else if (a < 2000) {
                colors[BLUE]++;
            } else if (a < 2400) {
                colors[YELLOW]++;
            } else if (a < 2800) {
                colors[ORANGE]++;
            } else if (a < 3200) {
                colors[RED]++;
            } else {
                colors[OTHERS]++;
            }
        }

        int min = 0;
        int max;
        for (int i = 0; i <= RED; i++) {
            if (colors[i] > 0) {
                min++;
            }
        }

        max = min + colors[OTHERS];
        min = min == 0 && colors[OTHERS] > 0 ? 1 : min;

        System.out.println(min + " " + max);
    }
}
