import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
 
public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        br.readLine();
        String[] in = br.readLine().split(" ");
        ArrayList<Integer> list = new ArrayList<Integer>();
        boolean[] color = {true, true, true, true, true, true, true, true};
        for(int i = 0; i < in.length; i++) {
            list.add(Integer.parseInt(in[i]));
        }
        int count = 0;
        int min = 0;
        int max = 0;
        for(int j = 0; j < list.size(); j++) {
            if(list.get(j) < 400 && color[0]){
                color[0] = false;
                count++;
            } else if(list.get(j) >= 400 && list.get(j) < 800 && color[1]) {
                color[1] = false;
                count++;
            } else if(list.get(j) >= 800 && list.get(j) < 1200 && color[2]) {
                color[2] = false;
                count++;
            } else if(list.get(j) >= 1200 && list.get(j) < 1600 && color[3]) {
                color[3] = false;
                count++;
            } else if(list.get(j) >= 1600 && list.get(j) < 2000 && color[4]) {
                color[4] = false;
                count++;
            } else if(list.get(j) >= 2000 && list.get(j) < 2400 && color[5]) {
                color[5] = false;
                count++;
            } else if(list.get(j) >= 2400 && list.get(j) < 2800 && color[6]) {
                color[6] = false;
                count++;
            } else if(list.get(j) >= 2800 && list.get(j) < 3200 && color[7]) {
                color[7] = false;
                count++;
            } else if(list.get(j) >= 3200) {
                max++;
            }
        }
        max = max + count;
        min = count;
        if(min == 0) {
            min++;
        }
        System.out.println(min + " " + max);
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.ArrayList; ArrayList java.util public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        br.readLine();
        String[] in = br.readLine().split(" ");
        ArrayList<Integer> list = new ArrayList<Integer>();
        boolean[] color = {true, true, true, true, true, true, true, true};
        for(int i = 0; i < in.length; i++) {
            list.add(Integer.parseInt(in[i]));
        }
        int count = 0;
        int min = 0;
        int max = 0;
        for(int j = 0; j < list.size(); j++) {
            if(list.get(j) < 400 && color[0]){
                color[0] = false;
                count++;
            } else if(list.get(j) >= 400 && list.get(j) < 800 && color[1]) {
                color[1] = false;
                count++;
            } else if(list.get(j) >= 800 && list.get(j) < 1200 && color[2]) {
                color[2] = false;
                count++;
            } else if(list.get(j) >= 1200 && list.get(j) < 1600 && color[3]) {
                color[3] = false;
                count++;
            } else if(list.get(j) >= 1600 && list.get(j) < 2000 && color[4]) {
                color[4] = false;
                count++;
            } else if(list.get(j) >= 2000 && list.get(j) < 2400 && color[5]) {
                color[5] = false;
                count++;
            } else if(list.get(j) >= 2400 && list.get(j) < 2800 && color[6]) {
                color[6] = false;
                count++;
            } else if(list.get(j) >= 2800 && list.get(j) < 3200 && color[7]) {
                color[7] = false;
                count++;
            } else if(list.get(j) >= 3200) {
                max++;
            }
        }
        max = max + count;
        min = count;
        if(min == 0) {
            min++;
        }
        System.out.println(min + " " + max);
    }
} Main public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        br.readLine();
        String[] in = br.readLine().split(" ");
        ArrayList<Integer> list = new ArrayList<Integer>();
        boolean[] color = {true, true, true, true, true, true, true, true};
        for(int i = 0; i < in.length; i++) {
            list.add(Integer.parseInt(in[i]));
        }
        int count = 0;
        int min = 0;
        int max = 0;
        for(int j = 0; j < list.size(); j++) {
            if(list.get(j) < 400 && color[0]){
                color[0] = false;
                count++;
            } else if(list.get(j) >= 400 && list.get(j) < 800 && color[1]) {
                color[1] = false;
                count++;
            } else if(list.get(j) >= 800 && list.get(j) < 1200 && color[2]) {
                color[2] = false;
                count++;
            } else if(list.get(j) >= 1200 && list.get(j) < 1600 && color[3]) {
                color[3] = false;
                count++;
            } else if(list.get(j) >= 1600 && list.get(j) < 2000 && color[4]) {
                color[4] = false;
                count++;
            } else if(list.get(j) >= 2000 && list.get(j) < 2400 && color[5]) {
                color[5] = false;
                count++;
            } else if(list.get(j) >= 2400 && list.get(j) < 2800 && color[6]) {
                color[6] = false;
                count++;
            } else if(list.get(j) >= 2800 && list.get(j) < 3200 && color[7]) {
                color[7] = false;
                count++;
            } else if(list.get(j) >= 3200) {
                max++;
            }
        }
        max = max + count;
        min = count;
        if(min == 0) {
            min++;
        }
        System.out.println(min + " " + max);
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        br.readLine();
        String[] in = br.readLine().split(" ");
        ArrayList<Integer> list = new ArrayList<Integer>();
        boolean[] color = {true, true, true, true, true, true, true, true};
        for(int i = 0; i < in.length; i++) {
            list.add(Integer.parseInt(in[i]));
        }
        int count = 0;
        int min = 0;
        int max = 0;
        for(int j = 0; j < list.size(); j++) {
            if(list.get(j) < 400 && color[0]){
                color[0] = false;
                count++;
            } else if(list.get(j) >= 400 && list.get(j) < 800 && color[1]) {
                color[1] = false;
                count++;
            } else if(list.get(j) >= 800 && list.get(j) < 1200 && color[2]) {
                color[2] = false;
                count++;
            } else if(list.get(j) >= 1200 && list.get(j) < 1600 && color[3]) {
                color[3] = false;
                count++;
            } else if(list.get(j) >= 1600 && list.get(j) < 2000 && color[4]) {
                color[4] = false;
                count++;
            } else if(list.get(j) >= 2000 && list.get(j) < 2400 && color[5]) {
                color[5] = false;
                count++;
            } else if(list.get(j) >= 2400 && list.get(j) < 2800 && color[6]) {
                color[6] = false;
                count++;
            } else if(list.get(j) >= 2800 && list.get(j) < 3200 && color[7]) {
                color[7] = false;
                count++;
            } else if(list.get(j) >= 3200) {
                max++;
            }
        }
        max = max + count;
        min = count;
        if(min == 0) {
            min++;
        }
        System.out.println(min + " " + max);
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) br.readLine() br.readLine br String[] in = br.readLine().split(" "); in br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " ArrayList<Integer> list = new ArrayList<Integer>(); list new ArrayList<Integer>() boolean[] color = {true, true, true, true, true, true, true, true}; color {true, true, true, true, true, true, true, true} true true true true true true true true for(int i = 0; i < in.length; i++) {
            list.add(Integer.parseInt(in[i]));
        } int i = 0; int i = 0; i 0 i < in.length i in.length in in.length i++ i++ i {
            list.add(Integer.parseInt(in[i]));
        } {
            list.add(Integer.parseInt(in[i]));
        } list.add(Integer.parseInt(in[i])) list.add list Integer.parseInt(in[i]) Integer.parseInt Integer in[i] in i int count = 0; count 0 int min = 0; min 0 int max = 0; max 0 for(int j = 0; j < list.size(); j++) {
            if(list.get(j) < 400 && color[0]){
                color[0] = false;
                count++;
            } else if(list.get(j) >= 400 && list.get(j) < 800 && color[1]) {
                color[1] = false;
                count++;
            } else if(list.get(j) >= 800 && list.get(j) < 1200 && color[2]) {
                color[2] = false;
                count++;
            } else if(list.get(j) >= 1200 && list.get(j) < 1600 && color[3]) {
                color[3] = false;
                count++;
            } else if(list.get(j) >= 1600 && list.get(j) < 2000 && color[4]) {
                color[4] = false;
                count++;
            } else if(list.get(j) >= 2000 && list.get(j) < 2400 && color[5]) {
                color[5] = false;
                count++;
            } else if(list.get(j) >= 2400 && list.get(j) < 2800 && color[6]) {
                color[6] = false;
                count++;
            } else if(list.get(j) >= 2800 && list.get(j) < 3200 && color[7]) {
                color[7] = false;
                count++;
            } else if(list.get(j) >= 3200) {
                max++;
            }
        } int j = 0; int j = 0; j 0 j < list.size() j list.size() list.size list j++ j++ j {
            if(list.get(j) < 400 && color[0]){
                color[0] = false;
                count++;
            } else if(list.get(j) >= 400 && list.get(j) < 800 && color[1]) {
                color[1] = false;
                count++;
            } else if(list.get(j) >= 800 && list.get(j) < 1200 && color[2]) {
                color[2] = false;
                count++;
            } else if(list.get(j) >= 1200 && list.get(j) < 1600 && color[3]) {
                color[3] = false;
                count++;
            } else if(list.get(j) >= 1600 && list.get(j) < 2000 && color[4]) {
                color[4] = false;
                count++;
            } else if(list.get(j) >= 2000 && list.get(j) < 2400 && color[5]) {
                color[5] = false;
                count++;
            } else if(list.get(j) >= 2400 && list.get(j) < 2800 && color[6]) {
                color[6] = false;
                count++;
            } else if(list.get(j) >= 2800 && list.get(j) < 3200 && color[7]) {
                color[7] = false;
                count++;
            } else if(list.get(j) >= 3200) {
                max++;
            }
        } {
            if(list.get(j) < 400 && color[0]){
                color[0] = false;
                count++;
            } else if(list.get(j) >= 400 && list.get(j) < 800 && color[1]) {
                color[1] = false;
                count++;
            } else if(list.get(j) >= 800 && list.get(j) < 1200 && color[2]) {
                color[2] = false;
                count++;
            } else if(list.get(j) >= 1200 && list.get(j) < 1600 && color[3]) {
                color[3] = false;
                count++;
            } else if(list.get(j) >= 1600 && list.get(j) < 2000 && color[4]) {
                color[4] = false;
                count++;
            } else if(list.get(j) >= 2000 && list.get(j) < 2400 && color[5]) {
                color[5] = false;
                count++;
            } else if(list.get(j) >= 2400 && list.get(j) < 2800 && color[6]) {
                color[6] = false;
                count++;
            } else if(list.get(j) >= 2800 && list.get(j) < 3200 && color[7]) {
                color[7] = false;
                count++;
            } else if(list.get(j) >= 3200) {
                max++;
            }
        } if(list.get(j) < 400 && color[0]){
                color[0] = false;
                count++;
            } else if(list.get(j) >= 400 && list.get(j) < 800 && color[1]) {
                color[1] = false;
                count++;
            } else if(list.get(j) >= 800 && list.get(j) < 1200 && color[2]) {
                color[2] = false;
                count++;
            } else if(list.get(j) >= 1200 && list.get(j) < 1600 && color[3]) {
                color[3] = false;
                count++;
            } else if(list.get(j) >= 1600 && list.get(j) < 2000 && color[4]) {
                color[4] = false;
                count++;
            } else if(list.get(j) >= 2000 && list.get(j) < 2400 && color[5]) {
                color[5] = false;
                count++;
            } else if(list.get(j) >= 2400 && list.get(j) < 2800 && color[6]) {
                color[6] = false;
                count++;
            } else if(list.get(j) >= 2800 && list.get(j) < 3200 && color[7]) {
                color[7] = false;
                count++;
            } else if(list.get(j) >= 3200) {
                max++;
            } list.get(j) < 400 && color[0] list.get(j) < 400 list.get(j) list.get list j 400 color[0] color 0 {
                color[0] = false;
                count++;
            } color[0] = false color[0] color 0 false count++ count if(list.get(j) >= 400 && list.get(j) < 800 && color[1]) {
                color[1] = false;
                count++;
            } else if(list.get(j) >= 800 && list.get(j) < 1200 && color[2]) {
                color[2] = false;
                count++;
            } else if(list.get(j) >= 1200 && list.get(j) < 1600 && color[3]) {
                color[3] = false;
                count++;
            } else if(list.get(j) >= 1600 && list.get(j) < 2000 && color[4]) {
                color[4] = false;
                count++;
            } else if(list.get(j) >= 2000 && list.get(j) < 2400 && color[5]) {
                color[5] = false;
                count++;
            } else if(list.get(j) >= 2400 && list.get(j) < 2800 && color[6]) {
                color[6] = false;
                count++;
            } else if(list.get(j) >= 2800 && list.get(j) < 3200 && color[7]) {
                color[7] = false;
                count++;
            } else if(list.get(j) >= 3200) {
                max++;
            } list.get(j) >= 400 && list.get(j) < 800 && color[1] list.get(j) >= 400 && list.get(j) < 800 && color[1] list.get(j) >= 400 list.get(j) list.get list j 400 list.get(j) < 800 list.get(j) list.get list j 800 color[1] color 1 {
                color[1] = false;
                count++;
            } color[1] = false color[1] color 1 false count++ count if(list.get(j) >= 800 && list.get(j) < 1200 && color[2]) {
                color[2] = false;
                count++;
            } else if(list.get(j) >= 1200 && list.get(j) < 1600 && color[3]) {
                color[3] = false;
                count++;
            } else if(list.get(j) >= 1600 && list.get(j) < 2000 && color[4]) {
                color[4] = false;
                count++;
            } else if(list.get(j) >= 2000 && list.get(j) < 2400 && color[5]) {
                color[5] = false;
                count++;
            } else if(list.get(j) >= 2400 && list.get(j) < 2800 && color[6]) {
                color[6] = false;
                count++;
            } else if(list.get(j) >= 2800 && list.get(j) < 3200 && color[7]) {
                color[7] = false;
                count++;
            } else if(list.get(j) >= 3200) {
                max++;
            } list.get(j) >= 800 && list.get(j) < 1200 && color[2] list.get(j) >= 800 && list.get(j) < 1200 && color[2] list.get(j) >= 800 list.get(j) list.get list j 800 list.get(j) < 1200 list.get(j) list.get list j 1200 color[2] color 2 {
                color[2] = false;
                count++;
            } color[2] = false color[2] color 2 false count++ count if(list.get(j) >= 1200 && list.get(j) < 1600 && color[3]) {
                color[3] = false;
                count++;
            } else if(list.get(j) >= 1600 && list.get(j) < 2000 && color[4]) {
                color[4] = false;
                count++;
            } else if(list.get(j) >= 2000 && list.get(j) < 2400 && color[5]) {
                color[5] = false;
                count++;
            } else if(list.get(j) >= 2400 && list.get(j) < 2800 && color[6]) {
                color[6] = false;
                count++;
            } else if(list.get(j) >= 2800 && list.get(j) < 3200 && color[7]) {
                color[7] = false;
                count++;
            } else if(list.get(j) >= 3200) {
                max++;
            } list.get(j) >= 1200 && list.get(j) < 1600 && color[3] list.get(j) >= 1200 && list.get(j) < 1600 && color[3] list.get(j) >= 1200 list.get(j) list.get list j 1200 list.get(j) < 1600 list.get(j) list.get list j 1600 color[3] color 3 {
                color[3] = false;
                count++;
            } color[3] = false color[3] color 3 false count++ count if(list.get(j) >= 1600 && list.get(j) < 2000 && color[4]) {
                color[4] = false;
                count++;
            } else if(list.get(j) >= 2000 && list.get(j) < 2400 && color[5]) {
                color[5] = false;
                count++;
            } else if(list.get(j) >= 2400 && list.get(j) < 2800 && color[6]) {
                color[6] = false;
                count++;
            } else if(list.get(j) >= 2800 && list.get(j) < 3200 && color[7]) {
                color[7] = false;
                count++;
            } else if(list.get(j) >= 3200) {
                max++;
            } list.get(j) >= 1600 && list.get(j) < 2000 && color[4] list.get(j) >= 1600 && list.get(j) < 2000 && color[4] list.get(j) >= 1600 list.get(j) list.get list j 1600 list.get(j) < 2000 list.get(j) list.get list j 2000 color[4] color 4 {
                color[4] = false;
                count++;
            } color[4] = false color[4] color 4 false count++ count if(list.get(j) >= 2000 && list.get(j) < 2400 && color[5]) {
                color[5] = false;
                count++;
            } else if(list.get(j) >= 2400 && list.get(j) < 2800 && color[6]) {
                color[6] = false;
                count++;
            } else if(list.get(j) >= 2800 && list.get(j) < 3200 && color[7]) {
                color[7] = false;
                count++;
            } else if(list.get(j) >= 3200) {
                max++;
            } list.get(j) >= 2000 && list.get(j) < 2400 && color[5] list.get(j) >= 2000 && list.get(j) < 2400 && color[5] list.get(j) >= 2000 list.get(j) list.get list j 2000 list.get(j) < 2400 list.get(j) list.get list j 2400 color[5] color 5 {
                color[5] = false;
                count++;
            } color[5] = false color[5] color 5 false count++ count if(list.get(j) >= 2400 && list.get(j) < 2800 && color[6]) {
                color[6] = false;
                count++;
            } else if(list.get(j) >= 2800 && list.get(j) < 3200 && color[7]) {
                color[7] = false;
                count++;
            } else if(list.get(j) >= 3200) {
                max++;
            } list.get(j) >= 2400 && list.get(j) < 2800 && color[6] list.get(j) >= 2400 && list.get(j) < 2800 && color[6] list.get(j) >= 2400 list.get(j) list.get list j 2400 list.get(j) < 2800 list.get(j) list.get list j 2800 color[6] color 6 {
                color[6] = false;
                count++;
            } color[6] = false color[6] color 6 false count++ count if(list.get(j) >= 2800 && list.get(j) < 3200 && color[7]) {
                color[7] = false;
                count++;
            } else if(list.get(j) >= 3200) {
                max++;
            } list.get(j) >= 2800 && list.get(j) < 3200 && color[7] list.get(j) >= 2800 && list.get(j) < 3200 && color[7] list.get(j) >= 2800 list.get(j) list.get list j 2800 list.get(j) < 3200 list.get(j) list.get list j 3200 color[7] color 7 {
                color[7] = false;
                count++;
            } color[7] = false color[7] color 7 false count++ count if(list.get(j) >= 3200) {
                max++;
            } list.get(j) >= 3200 list.get(j) list.get list j 3200 {
                max++;
            } max++ max max = max + count max max + count max count min = count min count if(min == 0) {
            min++;
        } min == 0 min 0 {
            min++;
        } min++ min System.out.println(min + " " + max) System.out.println System.out System System.out min + " " + max min + " " + max min " " max String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        br.readLine();
        String[] in = br.readLine().split(" ");
        ArrayList<Integer> list = new ArrayList<Integer>();
        boolean[] color = {true, true, true, true, true, true, true, true};
        for(int i = 0; i < in.length; i++) {
            list.add(Integer.parseInt(in[i]));
        }
        int count = 0;
        int min = 0;
        int max = 0;
        for(int j = 0; j < list.size(); j++) {
            if(list.get(j) < 400 && color[0]){
                color[0] = false;
                count++;
            } else if(list.get(j) >= 400 && list.get(j) < 800 && color[1]) {
                color[1] = false;
                count++;
            } else if(list.get(j) >= 800 && list.get(j) < 1200 && color[2]) {
                color[2] = false;
                count++;
            } else if(list.get(j) >= 1200 && list.get(j) < 1600 && color[3]) {
                color[3] = false;
                count++;
            } else if(list.get(j) >= 1600 && list.get(j) < 2000 && color[4]) {
                color[4] = false;
                count++;
            } else if(list.get(j) >= 2000 && list.get(j) < 2400 && color[5]) {
                color[5] = false;
                count++;
            } else if(list.get(j) >= 2400 && list.get(j) < 2800 && color[6]) {
                color[6] = false;
                count++;
            } else if(list.get(j) >= 2800 && list.get(j) < 3200 && color[7]) {
                color[7] = false;
                count++;
            } else if(list.get(j) >= 3200) {
                max++;
            }
        }
        max = max + count;
        min = count;
        if(min == 0) {
            min++;
        }
        System.out.println(min + " " + max);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        br.readLine();
        String[] in = br.readLine().split(" ");
        ArrayList<Integer> list = new ArrayList<Integer>();
        boolean[] color = {true, true, true, true, true, true, true, true};
        for(int i = 0; i < in.length; i++) {
            list.add(Integer.parseInt(in[i]));
        }
        int count = 0;
        int min = 0;
        int max = 0;
        for(int j = 0; j < list.size(); j++) {
            if(list.get(j) < 400 && color[0]){
                color[0] = false;
                count++;
            } else if(list.get(j) >= 400 && list.get(j) < 800 && color[1]) {
                color[1] = false;
                count++;
            } else if(list.get(j) >= 800 && list.get(j) < 1200 && color[2]) {
                color[2] = false;
                count++;
            } else if(list.get(j) >= 1200 && list.get(j) < 1600 && color[3]) {
                color[3] = false;
                count++;
            } else if(list.get(j) >= 1600 && list.get(j) < 2000 && color[4]) {
                color[4] = false;
                count++;
            } else if(list.get(j) >= 2000 && list.get(j) < 2400 && color[5]) {
                color[5] = false;
                count++;
            } else if(list.get(j) >= 2400 && list.get(j) < 2800 && color[6]) {
                color[6] = false;
                count++;
            } else if(list.get(j) >= 2800 && list.get(j) < 3200 && color[7]) {
                color[7] = false;
                count++;
            } else if(list.get(j) >= 3200) {
                max++;
            }
        }
        max = max + count;
        min = count;
        if(min == 0) {
            min++;
        }
        System.out.println(min + " " + max);
    }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
 
public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        br.readLine();
        String[] in = br.readLine().split(" ");
        ArrayList<Integer> list = new ArrayList<Integer>();
        boolean[] color = {true, true, true, true, true, true, true, true};
        for(int i = 0; i < in.length; i++) {
            list.add(Integer.parseInt(in[i]));
        }
        int count = 0;
        int min = 0;
        int max = 0;
        for(int j = 0; j < list.size(); j++) {
            if(list.get(j) < 400 && color[0]){
                color[0] = false;
                count++;
            } else if(list.get(j) >= 400 && list.get(j) < 800 && color[1]) {
                color[1] = false;
                count++;
            } else if(list.get(j) >= 800 && list.get(j) < 1200 && color[2]) {
                color[2] = false;
                count++;
            } else if(list.get(j) >= 1200 && list.get(j) < 1600 && color[3]) {
                color[3] = false;
                count++;
            } else if(list.get(j) >= 1600 && list.get(j) < 2000 && color[4]) {
                color[4] = false;
                count++;
            } else if(list.get(j) >= 2000 && list.get(j) < 2400 && color[5]) {
                color[5] = false;
                count++;
            } else if(list.get(j) >= 2400 && list.get(j) < 2800 && color[6]) {
                color[6] = false;
                count++;
            } else if(list.get(j) >= 2800 && list.get(j) < 3200 && color[7]) {
                color[7] = false;
                count++;
            } else if(list.get(j) >= 3200) {
                max++;
            }
        }
        max = max + count;
        min = count;
        if(min == 0) {
            min++;
        }
        System.out.println(min + " " + max);
    }
}