import java.util.Scanner;
import java.util.Map;
import java.util.HashMap;
public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        Map<String,Integer> map = createMap(sc,n);
        int free = 0;
        int min = 1;
        int max = 0;
        if(map.get("free") != null){
            free = map.get("free");
            if(map.size() > 1){
                min = map.size()-1;
                max = min + free;
            }
            else{
                max = free;
            }
        }
        else{
            min = map.size();
            max = map.size();
        }
        System.out.println(min);
        System.out.println(max);
    }
    public static Map<String,Integer> createMap(Scanner sc,int n){
        Map<String,Integer> map = new HashMap<>();
        for(int i = 0;i < n;i++){
            int a = sc.nextInt();
            if(a >= 1 && a <= 399){
                if(map.get("gray") != null){
                    map.put("gray",map.get("gray"));
                }
                map.put("gray",1);
            }
            if(a >= 400 && a <= 799){
                if(map.get("brown") != null){
                    map.put("brown",map.get("brown"));
                }
                map.put("brown",1);
            }
            if(a >= 800 && a <= 1199){
                if(map.get("green") != null){
                    map.put("green",map.get("green"));
                }
                map.put("green",1);
            }
            if(a >= 1200 && a <= 1599){
                if(map.get("lightblue") != null){
                    map.put("lightblue",map.get("lightblue"));
                }
                map.put("lightblue",1);
            }
            if(a >= 1600 && a <= 1999){
                if(map.get("blue") != null){
                    map.put("blue",map.get("blue"));
                }
                map.put("blue",1);
            }
            if(a >= 2000 && a <= 2399){
                if(map.get("yellow") != null){
                    map.put("yellow",map.get("yellow"));
                }
                map.put("yellow",1);
            }
            if(a >= 2400 && a <= 2799){
                if(map.get("orange") != null){
                    map.put("orange",map.get("orange"));
                }
                map.put("orange",1);
            }
            if(a >= 2800 && a <= 3199){
                if(map.get("red") != null){
                    map.put("red",map.get("red"));
                }
                map.put("red",1);
            }
            if(a >= 3200 && a <= 4800){
                if(map.get("free") != null){
                    map.put("free",map.get("free")+1);
                    continue;
                }
                map.put("free",1);
            }
        }
        return map;
    }
} import java.util.Scanner; Scanner java.util import java.util.Map; Map java.util import java.util.HashMap; HashMap java.util public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        Map<String,Integer> map = createMap(sc,n);
        int free = 0;
        int min = 1;
        int max = 0;
        if(map.get("free") != null){
            free = map.get("free");
            if(map.size() > 1){
                min = map.size()-1;
                max = min + free;
            }
            else{
                max = free;
            }
        }
        else{
            min = map.size();
            max = map.size();
        }
        System.out.println(min);
        System.out.println(max);
    }
    public static Map<String,Integer> createMap(Scanner sc,int n){
        Map<String,Integer> map = new HashMap<>();
        for(int i = 0;i < n;i++){
            int a = sc.nextInt();
            if(a >= 1 && a <= 399){
                if(map.get("gray") != null){
                    map.put("gray",map.get("gray"));
                }
                map.put("gray",1);
            }
            if(a >= 400 && a <= 799){
                if(map.get("brown") != null){
                    map.put("brown",map.get("brown"));
                }
                map.put("brown",1);
            }
            if(a >= 800 && a <= 1199){
                if(map.get("green") != null){
                    map.put("green",map.get("green"));
                }
                map.put("green",1);
            }
            if(a >= 1200 && a <= 1599){
                if(map.get("lightblue") != null){
                    map.put("lightblue",map.get("lightblue"));
                }
                map.put("lightblue",1);
            }
            if(a >= 1600 && a <= 1999){
                if(map.get("blue") != null){
                    map.put("blue",map.get("blue"));
                }
                map.put("blue",1);
            }
            if(a >= 2000 && a <= 2399){
                if(map.get("yellow") != null){
                    map.put("yellow",map.get("yellow"));
                }
                map.put("yellow",1);
            }
            if(a >= 2400 && a <= 2799){
                if(map.get("orange") != null){
                    map.put("orange",map.get("orange"));
                }
                map.put("orange",1);
            }
            if(a >= 2800 && a <= 3199){
                if(map.get("red") != null){
                    map.put("red",map.get("red"));
                }
                map.put("red",1);
            }
            if(a >= 3200 && a <= 4800){
                if(map.get("free") != null){
                    map.put("free",map.get("free")+1);
                    continue;
                }
                map.put("free",1);
            }
        }
        return map;
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        Map<String,Integer> map = createMap(sc,n);
        int free = 0;
        int min = 1;
        int max = 0;
        if(map.get("free") != null){
            free = map.get("free");
            if(map.size() > 1){
                min = map.size()-1;
                max = min + free;
            }
            else{
                max = free;
            }
        }
        else{
            min = map.size();
            max = map.size();
        }
        System.out.println(min);
        System.out.println(max);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        Map<String,Integer> map = createMap(sc,n);
        int free = 0;
        int min = 1;
        int max = 0;
        if(map.get("free") != null){
            free = map.get("free");
            if(map.size() > 1){
                min = map.size()-1;
                max = min + free;
            }
            else{
                max = free;
            }
        }
        else{
            min = map.size();
            max = map.size();
        }
        System.out.println(min);
        System.out.println(max);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc Map<String,Integer> map = createMap(sc,n); map createMap(sc,n) createMap sc n int free = 0; free 0 int min = 1; min 1 int max = 0; max 0 if(map.get("free") != null){
            free = map.get("free");
            if(map.size() > 1){
                min = map.size()-1;
                max = min + free;
            }
            else{
                max = free;
            }
        }
        else{
            min = map.size();
            max = map.size();
        } map.get("free") != null map.get("free") map.get map "free" null {
            free = map.get("free");
            if(map.size() > 1){
                min = map.size()-1;
                max = min + free;
            }
            else{
                max = free;
            }
        } free = map.get("free") free map.get("free") map.get map "free" if(map.size() > 1){
                min = map.size()-1;
                max = min + free;
            }
            else{
                max = free;
            } map.size() > 1 map.size() map.size map 1 {
                min = map.size()-1;
                max = min + free;
            } min = map.size()-1 min map.size()-1 map.size() map.size map 1 max = min + free max min + free min free {
                max = free;
            } max = free max free {
            min = map.size();
            max = map.size();
        } min = map.size() min map.size() map.size map max = map.size() max map.size() map.size map System.out.println(min) System.out.println System.out System System.out min System.out.println(max) System.out.println System.out System System.out max String[] args args public static Map<String,Integer> createMap(Scanner sc,int n){
        Map<String,Integer> map = new HashMap<>();
        for(int i = 0;i < n;i++){
            int a = sc.nextInt();
            if(a >= 1 && a <= 399){
                if(map.get("gray") != null){
                    map.put("gray",map.get("gray"));
                }
                map.put("gray",1);
            }
            if(a >= 400 && a <= 799){
                if(map.get("brown") != null){
                    map.put("brown",map.get("brown"));
                }
                map.put("brown",1);
            }
            if(a >= 800 && a <= 1199){
                if(map.get("green") != null){
                    map.put("green",map.get("green"));
                }
                map.put("green",1);
            }
            if(a >= 1200 && a <= 1599){
                if(map.get("lightblue") != null){
                    map.put("lightblue",map.get("lightblue"));
                }
                map.put("lightblue",1);
            }
            if(a >= 1600 && a <= 1999){
                if(map.get("blue") != null){
                    map.put("blue",map.get("blue"));
                }
                map.put("blue",1);
            }
            if(a >= 2000 && a <= 2399){
                if(map.get("yellow") != null){
                    map.put("yellow",map.get("yellow"));
                }
                map.put("yellow",1);
            }
            if(a >= 2400 && a <= 2799){
                if(map.get("orange") != null){
                    map.put("orange",map.get("orange"));
                }
                map.put("orange",1);
            }
            if(a >= 2800 && a <= 3199){
                if(map.get("red") != null){
                    map.put("red",map.get("red"));
                }
                map.put("red",1);
            }
            if(a >= 3200 && a <= 4800){
                if(map.get("free") != null){
                    map.put("free",map.get("free")+1);
                    continue;
                }
                map.put("free",1);
            }
        }
        return map;
    } createMap {
        Map<String,Integer> map = new HashMap<>();
        for(int i = 0;i < n;i++){
            int a = sc.nextInt();
            if(a >= 1 && a <= 399){
                if(map.get("gray") != null){
                    map.put("gray",map.get("gray"));
                }
                map.put("gray",1);
            }
            if(a >= 400 && a <= 799){
                if(map.get("brown") != null){
                    map.put("brown",map.get("brown"));
                }
                map.put("brown",1);
            }
            if(a >= 800 && a <= 1199){
                if(map.get("green") != null){
                    map.put("green",map.get("green"));
                }
                map.put("green",1);
            }
            if(a >= 1200 && a <= 1599){
                if(map.get("lightblue") != null){
                    map.put("lightblue",map.get("lightblue"));
                }
                map.put("lightblue",1);
            }
            if(a >= 1600 && a <= 1999){
                if(map.get("blue") != null){
                    map.put("blue",map.get("blue"));
                }
                map.put("blue",1);
            }
            if(a >= 2000 && a <= 2399){
                if(map.get("yellow") != null){
                    map.put("yellow",map.get("yellow"));
                }
                map.put("yellow",1);
            }
            if(a >= 2400 && a <= 2799){
                if(map.get("orange") != null){
                    map.put("orange",map.get("orange"));
                }
                map.put("orange",1);
            }
            if(a >= 2800 && a <= 3199){
                if(map.get("red") != null){
                    map.put("red",map.get("red"));
                }
                map.put("red",1);
            }
            if(a >= 3200 && a <= 4800){
                if(map.get("free") != null){
                    map.put("free",map.get("free")+1);
                    continue;
                }
                map.put("free",1);
            }
        }
        return map;
    } Map<String,Integer> map = new HashMap<>(); map new HashMap<>() for(int i = 0;i < n;i++){
            int a = sc.nextInt();
            if(a >= 1 && a <= 399){
                if(map.get("gray") != null){
                    map.put("gray",map.get("gray"));
                }
                map.put("gray",1);
            }
            if(a >= 400 && a <= 799){
                if(map.get("brown") != null){
                    map.put("brown",map.get("brown"));
                }
                map.put("brown",1);
            }
            if(a >= 800 && a <= 1199){
                if(map.get("green") != null){
                    map.put("green",map.get("green"));
                }
                map.put("green",1);
            }
            if(a >= 1200 && a <= 1599){
                if(map.get("lightblue") != null){
                    map.put("lightblue",map.get("lightblue"));
                }
                map.put("lightblue",1);
            }
            if(a >= 1600 && a <= 1999){
                if(map.get("blue") != null){
                    map.put("blue",map.get("blue"));
                }
                map.put("blue",1);
            }
            if(a >= 2000 && a <= 2399){
                if(map.get("yellow") != null){
                    map.put("yellow",map.get("yellow"));
                }
                map.put("yellow",1);
            }
            if(a >= 2400 && a <= 2799){
                if(map.get("orange") != null){
                    map.put("orange",map.get("orange"));
                }
                map.put("orange",1);
            }
            if(a >= 2800 && a <= 3199){
                if(map.get("red") != null){
                    map.put("red",map.get("red"));
                }
                map.put("red",1);
            }
            if(a >= 3200 && a <= 4800){
                if(map.get("free") != null){
                    map.put("free",map.get("free")+1);
                    continue;
                }
                map.put("free",1);
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            int a = sc.nextInt();
            if(a >= 1 && a <= 399){
                if(map.get("gray") != null){
                    map.put("gray",map.get("gray"));
                }
                map.put("gray",1);
            }
            if(a >= 400 && a <= 799){
                if(map.get("brown") != null){
                    map.put("brown",map.get("brown"));
                }
                map.put("brown",1);
            }
            if(a >= 800 && a <= 1199){
                if(map.get("green") != null){
                    map.put("green",map.get("green"));
                }
                map.put("green",1);
            }
            if(a >= 1200 && a <= 1599){
                if(map.get("lightblue") != null){
                    map.put("lightblue",map.get("lightblue"));
                }
                map.put("lightblue",1);
            }
            if(a >= 1600 && a <= 1999){
                if(map.get("blue") != null){
                    map.put("blue",map.get("blue"));
                }
                map.put("blue",1);
            }
            if(a >= 2000 && a <= 2399){
                if(map.get("yellow") != null){
                    map.put("yellow",map.get("yellow"));
                }
                map.put("yellow",1);
            }
            if(a >= 2400 && a <= 2799){
                if(map.get("orange") != null){
                    map.put("orange",map.get("orange"));
                }
                map.put("orange",1);
            }
            if(a >= 2800 && a <= 3199){
                if(map.get("red") != null){
                    map.put("red",map.get("red"));
                }
                map.put("red",1);
            }
            if(a >= 3200 && a <= 4800){
                if(map.get("free") != null){
                    map.put("free",map.get("free")+1);
                    continue;
                }
                map.put("free",1);
            }
        } {
            int a = sc.nextInt();
            if(a >= 1 && a <= 399){
                if(map.get("gray") != null){
                    map.put("gray",map.get("gray"));
                }
                map.put("gray",1);
            }
            if(a >= 400 && a <= 799){
                if(map.get("brown") != null){
                    map.put("brown",map.get("brown"));
                }
                map.put("brown",1);
            }
            if(a >= 800 && a <= 1199){
                if(map.get("green") != null){
                    map.put("green",map.get("green"));
                }
                map.put("green",1);
            }
            if(a >= 1200 && a <= 1599){
                if(map.get("lightblue") != null){
                    map.put("lightblue",map.get("lightblue"));
                }
                map.put("lightblue",1);
            }
            if(a >= 1600 && a <= 1999){
                if(map.get("blue") != null){
                    map.put("blue",map.get("blue"));
                }
                map.put("blue",1);
            }
            if(a >= 2000 && a <= 2399){
                if(map.get("yellow") != null){
                    map.put("yellow",map.get("yellow"));
                }
                map.put("yellow",1);
            }
            if(a >= 2400 && a <= 2799){
                if(map.get("orange") != null){
                    map.put("orange",map.get("orange"));
                }
                map.put("orange",1);
            }
            if(a >= 2800 && a <= 3199){
                if(map.get("red") != null){
                    map.put("red",map.get("red"));
                }
                map.put("red",1);
            }
            if(a >= 3200 && a <= 4800){
                if(map.get("free") != null){
                    map.put("free",map.get("free")+1);
                    continue;
                }
                map.put("free",1);
            }
        } int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc if(a >= 1 && a <= 399){
                if(map.get("gray") != null){
                    map.put("gray",map.get("gray"));
                }
                map.put("gray",1);
            } a >= 1 && a <= 399 a >= 1 a 1 a <= 399 a 399 {
                if(map.get("gray") != null){
                    map.put("gray",map.get("gray"));
                }
                map.put("gray",1);
            } if(map.get("gray") != null){
                    map.put("gray",map.get("gray"));
                } map.get("gray") != null map.get("gray") map.get map "gray" null {
                    map.put("gray",map.get("gray"));
                } map.put("gray",map.get("gray")) map.put map "gray" map.get("gray") map.get map "gray" map.put("gray",1) map.put map "gray" 1 if(a >= 400 && a <= 799){
                if(map.get("brown") != null){
                    map.put("brown",map.get("brown"));
                }
                map.put("brown",1);
            } a >= 400 && a <= 799 a >= 400 a 400 a <= 799 a 799 {
                if(map.get("brown") != null){
                    map.put("brown",map.get("brown"));
                }
                map.put("brown",1);
            } if(map.get("brown") != null){
                    map.put("brown",map.get("brown"));
                } map.get("brown") != null map.get("brown") map.get map "brown" null {
                    map.put("brown",map.get("brown"));
                } map.put("brown",map.get("brown")) map.put map "brown" map.get("brown") map.get map "brown" map.put("brown",1) map.put map "brown" 1 if(a >= 800 && a <= 1199){
                if(map.get("green") != null){
                    map.put("green",map.get("green"));
                }
                map.put("green",1);
            } a >= 800 && a <= 1199 a >= 800 a 800 a <= 1199 a 1199 {
                if(map.get("green") != null){
                    map.put("green",map.get("green"));
                }
                map.put("green",1);
            } if(map.get("green") != null){
                    map.put("green",map.get("green"));
                } map.get("green") != null map.get("green") map.get map "green" null {
                    map.put("green",map.get("green"));
                } map.put("green",map.get("green")) map.put map "green" map.get("green") map.get map "green" map.put("green",1) map.put map "green" 1 if(a >= 1200 && a <= 1599){
                if(map.get("lightblue") != null){
                    map.put("lightblue",map.get("lightblue"));
                }
                map.put("lightblue",1);
            } a >= 1200 && a <= 1599 a >= 1200 a 1200 a <= 1599 a 1599 {
                if(map.get("lightblue") != null){
                    map.put("lightblue",map.get("lightblue"));
                }
                map.put("lightblue",1);
            } if(map.get("lightblue") != null){
                    map.put("lightblue",map.get("lightblue"));
                } map.get("lightblue") != null map.get("lightblue") map.get map "lightblue" null {
                    map.put("lightblue",map.get("lightblue"));
                } map.put("lightblue",map.get("lightblue")) map.put map "lightblue" map.get("lightblue") map.get map "lightblue" map.put("lightblue",1) map.put map "lightblue" 1 if(a >= 1600 && a <= 1999){
                if(map.get("blue") != null){
                    map.put("blue",map.get("blue"));
                }
                map.put("blue",1);
            } a >= 1600 && a <= 1999 a >= 1600 a 1600 a <= 1999 a 1999 {
                if(map.get("blue") != null){
                    map.put("blue",map.get("blue"));
                }
                map.put("blue",1);
            } if(map.get("blue") != null){
                    map.put("blue",map.get("blue"));
                } map.get("blue") != null map.get("blue") map.get map "blue" null {
                    map.put("blue",map.get("blue"));
                } map.put("blue",map.get("blue")) map.put map "blue" map.get("blue") map.get map "blue" map.put("blue",1) map.put map "blue" 1 if(a >= 2000 && a <= 2399){
                if(map.get("yellow") != null){
                    map.put("yellow",map.get("yellow"));
                }
                map.put("yellow",1);
            } a >= 2000 && a <= 2399 a >= 2000 a 2000 a <= 2399 a 2399 {
                if(map.get("yellow") != null){
                    map.put("yellow",map.get("yellow"));
                }
                map.put("yellow",1);
            } if(map.get("yellow") != null){
                    map.put("yellow",map.get("yellow"));
                } map.get("yellow") != null map.get("yellow") map.get map "yellow" null {
                    map.put("yellow",map.get("yellow"));
                } map.put("yellow",map.get("yellow")) map.put map "yellow" map.get("yellow") map.get map "yellow" map.put("yellow",1) map.put map "yellow" 1 if(a >= 2400 && a <= 2799){
                if(map.get("orange") != null){
                    map.put("orange",map.get("orange"));
                }
                map.put("orange",1);
            } a >= 2400 && a <= 2799 a >= 2400 a 2400 a <= 2799 a 2799 {
                if(map.get("orange") != null){
                    map.put("orange",map.get("orange"));
                }
                map.put("orange",1);
            } if(map.get("orange") != null){
                    map.put("orange",map.get("orange"));
                } map.get("orange") != null map.get("orange") map.get map "orange" null {
                    map.put("orange",map.get("orange"));
                } map.put("orange",map.get("orange")) map.put map "orange" map.get("orange") map.get map "orange" map.put("orange",1) map.put map "orange" 1 if(a >= 2800 && a <= 3199){
                if(map.get("red") != null){
                    map.put("red",map.get("red"));
                }
                map.put("red",1);
            } a >= 2800 && a <= 3199 a >= 2800 a 2800 a <= 3199 a 3199 {
                if(map.get("red") != null){
                    map.put("red",map.get("red"));
                }
                map.put("red",1);
            } if(map.get("red") != null){
                    map.put("red",map.get("red"));
                } map.get("red") != null map.get("red") map.get map "red" null {
                    map.put("red",map.get("red"));
                } map.put("red",map.get("red")) map.put map "red" map.get("red") map.get map "red" map.put("red",1) map.put map "red" 1 if(a >= 3200 && a <= 4800){
                if(map.get("free") != null){
                    map.put("free",map.get("free")+1);
                    continue;
                }
                map.put("free",1);
            } a >= 3200 && a <= 4800 a >= 3200 a 3200 a <= 4800 a 4800 {
                if(map.get("free") != null){
                    map.put("free",map.get("free")+1);
                    continue;
                }
                map.put("free",1);
            } if(map.get("free") != null){
                    map.put("free",map.get("free")+1);
                    continue;
                } map.get("free") != null map.get("free") map.get map "free" null {
                    map.put("free",map.get("free")+1);
                    continue;
                } map.put("free",map.get("free")+1) map.put map "free" map.get("free")+1 map.get("free") map.get map "free" 1 continue; map.put("free",1) map.put map "free" 1 return map; map Scanner sc sc int n n public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        Map<String,Integer> map = createMap(sc,n);
        int free = 0;
        int min = 1;
        int max = 0;
        if(map.get("free") != null){
            free = map.get("free");
            if(map.size() > 1){
                min = map.size()-1;
                max = min + free;
            }
            else{
                max = free;
            }
        }
        else{
            min = map.size();
            max = map.size();
        }
        System.out.println(min);
        System.out.println(max);
    }
    public static Map<String,Integer> createMap(Scanner sc,int n){
        Map<String,Integer> map = new HashMap<>();
        for(int i = 0;i < n;i++){
            int a = sc.nextInt();
            if(a >= 1 && a <= 399){
                if(map.get("gray") != null){
                    map.put("gray",map.get("gray"));
                }
                map.put("gray",1);
            }
            if(a >= 400 && a <= 799){
                if(map.get("brown") != null){
                    map.put("brown",map.get("brown"));
                }
                map.put("brown",1);
            }
            if(a >= 800 && a <= 1199){
                if(map.get("green") != null){
                    map.put("green",map.get("green"));
                }
                map.put("green",1);
            }
            if(a >= 1200 && a <= 1599){
                if(map.get("lightblue") != null){
                    map.put("lightblue",map.get("lightblue"));
                }
                map.put("lightblue",1);
            }
            if(a >= 1600 && a <= 1999){
                if(map.get("blue") != null){
                    map.put("blue",map.get("blue"));
                }
                map.put("blue",1);
            }
            if(a >= 2000 && a <= 2399){
                if(map.get("yellow") != null){
                    map.put("yellow",map.get("yellow"));
                }
                map.put("yellow",1);
            }
            if(a >= 2400 && a <= 2799){
                if(map.get("orange") != null){
                    map.put("orange",map.get("orange"));
                }
                map.put("orange",1);
            }
            if(a >= 2800 && a <= 3199){
                if(map.get("red") != null){
                    map.put("red",map.get("red"));
                }
                map.put("red",1);
            }
            if(a >= 3200 && a <= 4800){
                if(map.get("free") != null){
                    map.put("free",map.get("free")+1);
                    continue;
                }
                map.put("free",1);
            }
        }
        return map;
    }
} public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        Map<String,Integer> map = createMap(sc,n);
        int free = 0;
        int min = 1;
        int max = 0;
        if(map.get("free") != null){
            free = map.get("free");
            if(map.size() > 1){
                min = map.size()-1;
                max = min + free;
            }
            else{
                max = free;
            }
        }
        else{
            min = map.size();
            max = map.size();
        }
        System.out.println(min);
        System.out.println(max);
    }
    public static Map<String,Integer> createMap(Scanner sc,int n){
        Map<String,Integer> map = new HashMap<>();
        for(int i = 0;i < n;i++){
            int a = sc.nextInt();
            if(a >= 1 && a <= 399){
                if(map.get("gray") != null){
                    map.put("gray",map.get("gray"));
                }
                map.put("gray",1);
            }
            if(a >= 400 && a <= 799){
                if(map.get("brown") != null){
                    map.put("brown",map.get("brown"));
                }
                map.put("brown",1);
            }
            if(a >= 800 && a <= 1199){
                if(map.get("green") != null){
                    map.put("green",map.get("green"));
                }
                map.put("green",1);
            }
            if(a >= 1200 && a <= 1599){
                if(map.get("lightblue") != null){
                    map.put("lightblue",map.get("lightblue"));
                }
                map.put("lightblue",1);
            }
            if(a >= 1600 && a <= 1999){
                if(map.get("blue") != null){
                    map.put("blue",map.get("blue"));
                }
                map.put("blue",1);
            }
            if(a >= 2000 && a <= 2399){
                if(map.get("yellow") != null){
                    map.put("yellow",map.get("yellow"));
                }
                map.put("yellow",1);
            }
            if(a >= 2400 && a <= 2799){
                if(map.get("orange") != null){
                    map.put("orange",map.get("orange"));
                }
                map.put("orange",1);
            }
            if(a >= 2800 && a <= 3199){
                if(map.get("red") != null){
                    map.put("red",map.get("red"));
                }
                map.put("red",1);
            }
            if(a >= 3200 && a <= 4800){
                if(map.get("free") != null){
                    map.put("free",map.get("free")+1);
                    continue;
                }
                map.put("free",1);
            }
        }
        return map;
    }
} Main
import java.util.Scanner;
import java.util.Map;
import java.util.HashMap;
public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        Map<String,Integer> map = createMap(sc,n);
        int free = 0;
        int min = 1;
        int max = 0;
        if(map.get("free") != null){
            free = map.get("free");
            if(map.size() > 1){
                min = map.size()-1;
                max = min + free;
            }
            else{
                max = free;
            }
        }
        else{
            min = map.size();
            max = map.size();
        }
        System.out.println(min);
        System.out.println(max);
    }
    public static Map<String,Integer> createMap(Scanner sc,int n){
        Map<String,Integer> map = new HashMap<>();
        for(int i = 0;i < n;i++){
            int a = sc.nextInt();
            if(a >= 1 && a <= 399){
                if(map.get("gray") != null){
                    map.put("gray",map.get("gray"));
                }
                map.put("gray",1);
            }
            if(a >= 400 && a <= 799){
                if(map.get("brown") != null){
                    map.put("brown",map.get("brown"));
                }
                map.put("brown",1);
            }
            if(a >= 800 && a <= 1199){
                if(map.get("green") != null){
                    map.put("green",map.get("green"));
                }
                map.put("green",1);
            }
            if(a >= 1200 && a <= 1599){
                if(map.get("lightblue") != null){
                    map.put("lightblue",map.get("lightblue"));
                }
                map.put("lightblue",1);
            }
            if(a >= 1600 && a <= 1999){
                if(map.get("blue") != null){
                    map.put("blue",map.get("blue"));
                }
                map.put("blue",1);
            }
            if(a >= 2000 && a <= 2399){
                if(map.get("yellow") != null){
                    map.put("yellow",map.get("yellow"));
                }
                map.put("yellow",1);
            }
            if(a >= 2400 && a <= 2799){
                if(map.get("orange") != null){
                    map.put("orange",map.get("orange"));
                }
                map.put("orange",1);
            }
            if(a >= 2800 && a <= 3199){
                if(map.get("red") != null){
                    map.put("red",map.get("red"));
                }
                map.put("red",1);
            }
            if(a >= 3200 && a <= 4800){
                if(map.get("free") != null){
                    map.put("free",map.get("free")+1);
                    continue;
                }
                map.put("free",1);
            }
        }
        return map;
    }
}
