import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        Map<Integer, Integer> m = new HashMap<>();
        for (int i = 0; i < 9; i++) {
            m.put(i, 0);
        }
        for (int i = 0; i < n; i++) {
            int a = s.nextInt();
            int t = a / 400;
            if (t >= 9) {
                t = 8;
            }
            m.put(t, m.get(t) + 1);
        }
        int min = 0;
        for (int i = 0; i < 8; i++) {
            if (m.get(i) != 0) {
                min++;
            }
        }
        int max = min + m.get(8);
        if (min == 0 && m.get(8) != 0) {
            min = 1;
        }
        System.out.printf("%s %s", min, max);
    }
} import java.util.HashMap; HashMap java.util import java.util.Map; Map java.util import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        Map<Integer, Integer> m = new HashMap<>();
        for (int i = 0; i < 9; i++) {
            m.put(i, 0);
        }
        for (int i = 0; i < n; i++) {
            int a = s.nextInt();
            int t = a / 400;
            if (t >= 9) {
                t = 8;
            }
            m.put(t, m.get(t) + 1);
        }
        int min = 0;
        for (int i = 0; i < 8; i++) {
            if (m.get(i) != 0) {
                min++;
            }
        }
        int max = min + m.get(8);
        if (min == 0 && m.get(8) != 0) {
            min = 1;
        }
        System.out.printf("%s %s", min, max);
    }
} Main public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        Map<Integer, Integer> m = new HashMap<>();
        for (int i = 0; i < 9; i++) {
            m.put(i, 0);
        }
        for (int i = 0; i < n; i++) {
            int a = s.nextInt();
            int t = a / 400;
            if (t >= 9) {
                t = 8;
            }
            m.put(t, m.get(t) + 1);
        }
        int min = 0;
        for (int i = 0; i < 8; i++) {
            if (m.get(i) != 0) {
                min++;
            }
        }
        int max = min + m.get(8);
        if (min == 0 && m.get(8) != 0) {
            min = 1;
        }
        System.out.printf("%s %s", min, max);
    } main {
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        Map<Integer, Integer> m = new HashMap<>();
        for (int i = 0; i < 9; i++) {
            m.put(i, 0);
        }
        for (int i = 0; i < n; i++) {
            int a = s.nextInt();
            int t = a / 400;
            if (t >= 9) {
                t = 8;
            }
            m.put(t, m.get(t) + 1);
        }
        int min = 0;
        for (int i = 0; i < 8; i++) {
            if (m.get(i) != 0) {
                min++;
            }
        }
        int max = min + m.get(8);
        if (min == 0 && m.get(8) != 0) {
            min = 1;
        }
        System.out.printf("%s %s", min, max);
    } Scanner s = new Scanner(System.in); s new Scanner(System.in) int n = s.nextInt(); n s.nextInt() s.nextInt s Map<Integer, Integer> m = new HashMap<>(); m new HashMap<>() for (int i = 0; i < 9; i++) {
            m.put(i, 0);
        } int i = 0; int i = 0; i 0 i < 9 i 9 i++ i++ i {
            m.put(i, 0);
        } {
            m.put(i, 0);
        } m.put(i, 0) m.put m i 0 for (int i = 0; i < n; i++) {
            int a = s.nextInt();
            int t = a / 400;
            if (t >= 9) {
                t = 8;
            }
            m.put(t, m.get(t) + 1);
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            int a = s.nextInt();
            int t = a / 400;
            if (t >= 9) {
                t = 8;
            }
            m.put(t, m.get(t) + 1);
        } {
            int a = s.nextInt();
            int t = a / 400;
            if (t >= 9) {
                t = 8;
            }
            m.put(t, m.get(t) + 1);
        } int a = s.nextInt(); a s.nextInt() s.nextInt s int t = a / 400; t a / 400 a 400 if (t >= 9) {
                t = 8;
            } t >= 9 t 9 {
                t = 8;
            } t = 8 t 8 m.put(t, m.get(t) + 1) m.put m t m.get(t) + 1 m.get(t) m.get m t 1 int min = 0; min 0 for (int i = 0; i < 8; i++) {
            if (m.get(i) != 0) {
                min++;
            }
        } int i = 0; int i = 0; i 0 i < 8 i 8 i++ i++ i {
            if (m.get(i) != 0) {
                min++;
            }
        } {
            if (m.get(i) != 0) {
                min++;
            }
        } if (m.get(i) != 0) {
                min++;
            } m.get(i) != 0 m.get(i) m.get m i 0 {
                min++;
            } min++ min int max = min + m.get(8); max min + m.get(8) min m.get(8) m.get m 8 if (min == 0 && m.get(8) != 0) {
            min = 1;
        } min == 0 && m.get(8) != 0 min == 0 min 0 m.get(8) != 0 m.get(8) m.get m 8 0 {
            min = 1;
        } min = 1 min 1 System.out.printf("%s %s", min, max) System.out.printf System.out System System.out "%s %s" min max String[] args args public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        Map<Integer, Integer> m = new HashMap<>();
        for (int i = 0; i < 9; i++) {
            m.put(i, 0);
        }
        for (int i = 0; i < n; i++) {
            int a = s.nextInt();
            int t = a / 400;
            if (t >= 9) {
                t = 8;
            }
            m.put(t, m.get(t) + 1);
        }
        int min = 0;
        for (int i = 0; i < 8; i++) {
            if (m.get(i) != 0) {
                min++;
            }
        }
        int max = min + m.get(8);
        if (min == 0 && m.get(8) != 0) {
            min = 1;
        }
        System.out.printf("%s %s", min, max);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        Map<Integer, Integer> m = new HashMap<>();
        for (int i = 0; i < 9; i++) {
            m.put(i, 0);
        }
        for (int i = 0; i < n; i++) {
            int a = s.nextInt();
            int t = a / 400;
            if (t >= 9) {
                t = 8;
            }
            m.put(t, m.get(t) + 1);
        }
        int min = 0;
        for (int i = 0; i < 8; i++) {
            if (m.get(i) != 0) {
                min++;
            }
        }
        int max = min + m.get(8);
        if (min == 0 && m.get(8) != 0) {
            min = 1;
        }
        System.out.printf("%s %s", min, max);
    }
} Main
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        Map<Integer, Integer> m = new HashMap<>();
        for (int i = 0; i < 9; i++) {
            m.put(i, 0);
        }
        for (int i = 0; i < n; i++) {
            int a = s.nextInt();
            int t = a / 400;
            if (t >= 9) {
                t = 8;
            }
            m.put(t, m.get(t) + 1);
        }
        int min = 0;
        for (int i = 0; i < 8; i++) {
            if (m.get(i) != 0) {
                min++;
            }
        }
        int max = min + m.get(8);
        if (min == 0 && m.get(8) != 0) {
            min = 1;
        }
        System.out.printf("%s %s", min, max);
    }
}
