import java.util.*;
 
public class Main{

    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int[] a = new int[N];
        Map<String, Integer> map = new HashMap<>();
        for(int i = 0; i < N; i++){
            a[i] = sc.nextInt();
            if(1 <= a[i] && a[i] <= 399){
                map.put("grey", 1);
            } else if(a[i] <= 799){
                map.put("brown", 1);
            } else if(a[i] <= 1199){
                map.put("green", 1);
            } else if(a[i] <= 1599){
                map.put("mizu", 1);
            } else if(a[i] <= 1999){
                map.put("blue", 1);
            } else if(a[i] <= 2399){
                map.put("yellow", 1);
            } else if(a[i] <= 2799){
                map.put("orange", 1);
            } else if(a[i] <= 3199){
                map.put("red", 1);
            } else {
                if(map.containsKey("all"))
                    map.put("all", map.get("all") + 1);
                else
                    map.put("all", 1);
            }
        }
        sc.close();

        int min = 0;
        int max = 0;
        if(map.size() == 1 && !(map.containsKey("all"))){
            min = 1;
            max = 1;
        } else if(map.size() == 1){
            min = 1;
            max = map.get("all");
        }else{
            for(String key: map.keySet()){
                if(key.equals("all")){
                    max += map.get(key);
                } else {
                    min += map.get(key);
                    max += map.get(key);
                }
            }
        }
        System.out.println(min + " " + max);
    }
} import java.util.*; util.* java public class Main{

    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int[] a = new int[N];
        Map<String, Integer> map = new HashMap<>();
        for(int i = 0; i < N; i++){
            a[i] = sc.nextInt();
            if(1 <= a[i] && a[i] <= 399){
                map.put("grey", 1);
            } else if(a[i] <= 799){
                map.put("brown", 1);
            } else if(a[i] <= 1199){
                map.put("green", 1);
            } else if(a[i] <= 1599){
                map.put("mizu", 1);
            } else if(a[i] <= 1999){
                map.put("blue", 1);
            } else if(a[i] <= 2399){
                map.put("yellow", 1);
            } else if(a[i] <= 2799){
                map.put("orange", 1);
            } else if(a[i] <= 3199){
                map.put("red", 1);
            } else {
                if(map.containsKey("all"))
                    map.put("all", map.get("all") + 1);
                else
                    map.put("all", 1);
            }
        }
        sc.close();

        int min = 0;
        int max = 0;
        if(map.size() == 1 && !(map.containsKey("all"))){
            min = 1;
            max = 1;
        } else if(map.size() == 1){
            min = 1;
            max = map.get("all");
        }else{
            for(String key: map.keySet()){
                if(key.equals("all")){
                    max += map.get(key);
                } else {
                    min += map.get(key);
                    max += map.get(key);
                }
            }
        }
        System.out.println(min + " " + max);
    }
} Main public static void main(String args[]){
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int[] a = new int[N];
        Map<String, Integer> map = new HashMap<>();
        for(int i = 0; i < N; i++){
            a[i] = sc.nextInt();
            if(1 <= a[i] && a[i] <= 399){
                map.put("grey", 1);
            } else if(a[i] <= 799){
                map.put("brown", 1);
            } else if(a[i] <= 1199){
                map.put("green", 1);
            } else if(a[i] <= 1599){
                map.put("mizu", 1);
            } else if(a[i] <= 1999){
                map.put("blue", 1);
            } else if(a[i] <= 2399){
                map.put("yellow", 1);
            } else if(a[i] <= 2799){
                map.put("orange", 1);
            } else if(a[i] <= 3199){
                map.put("red", 1);
            } else {
                if(map.containsKey("all"))
                    map.put("all", map.get("all") + 1);
                else
                    map.put("all", 1);
            }
        }
        sc.close();

        int min = 0;
        int max = 0;
        if(map.size() == 1 && !(map.containsKey("all"))){
            min = 1;
            max = 1;
        } else if(map.size() == 1){
            min = 1;
            max = map.get("all");
        }else{
            for(String key: map.keySet()){
                if(key.equals("all")){
                    max += map.get(key);
                } else {
                    min += map.get(key);
                    max += map.get(key);
                }
            }
        }
        System.out.println(min + " " + max);
    } main {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int[] a = new int[N];
        Map<String, Integer> map = new HashMap<>();
        for(int i = 0; i < N; i++){
            a[i] = sc.nextInt();
            if(1 <= a[i] && a[i] <= 399){
                map.put("grey", 1);
            } else if(a[i] <= 799){
                map.put("brown", 1);
            } else if(a[i] <= 1199){
                map.put("green", 1);
            } else if(a[i] <= 1599){
                map.put("mizu", 1);
            } else if(a[i] <= 1999){
                map.put("blue", 1);
            } else if(a[i] <= 2399){
                map.put("yellow", 1);
            } else if(a[i] <= 2799){
                map.put("orange", 1);
            } else if(a[i] <= 3199){
                map.put("red", 1);
            } else {
                if(map.containsKey("all"))
                    map.put("all", map.get("all") + 1);
                else
                    map.put("all", 1);
            }
        }
        sc.close();

        int min = 0;
        int max = 0;
        if(map.size() == 1 && !(map.containsKey("all"))){
            min = 1;
            max = 1;
        } else if(map.size() == 1){
            min = 1;
            max = map.get("all");
        }else{
            for(String key: map.keySet()){
                if(key.equals("all")){
                    max += map.get(key);
                } else {
                    min += map.get(key);
                    max += map.get(key);
                }
            }
        }
        System.out.println(min + " " + max);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int[] a = new int[N]; a new int[N] N Map<String, Integer> map = new HashMap<>(); map new HashMap<>() for(int i = 0; i < N; i++){
            a[i] = sc.nextInt();
            if(1 <= a[i] && a[i] <= 399){
                map.put("grey", 1);
            } else if(a[i] <= 799){
                map.put("brown", 1);
            } else if(a[i] <= 1199){
                map.put("green", 1);
            } else if(a[i] <= 1599){
                map.put("mizu", 1);
            } else if(a[i] <= 1999){
                map.put("blue", 1);
            } else if(a[i] <= 2399){
                map.put("yellow", 1);
            } else if(a[i] <= 2799){
                map.put("orange", 1);
            } else if(a[i] <= 3199){
                map.put("red", 1);
            } else {
                if(map.containsKey("all"))
                    map.put("all", map.get("all") + 1);
                else
                    map.put("all", 1);
            }
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            a[i] = sc.nextInt();
            if(1 <= a[i] && a[i] <= 399){
                map.put("grey", 1);
            } else if(a[i] <= 799){
                map.put("brown", 1);
            } else if(a[i] <= 1199){
                map.put("green", 1);
            } else if(a[i] <= 1599){
                map.put("mizu", 1);
            } else if(a[i] <= 1999){
                map.put("blue", 1);
            } else if(a[i] <= 2399){
                map.put("yellow", 1);
            } else if(a[i] <= 2799){
                map.put("orange", 1);
            } else if(a[i] <= 3199){
                map.put("red", 1);
            } else {
                if(map.containsKey("all"))
                    map.put("all", map.get("all") + 1);
                else
                    map.put("all", 1);
            }
        } {
            a[i] = sc.nextInt();
            if(1 <= a[i] && a[i] <= 399){
                map.put("grey", 1);
            } else if(a[i] <= 799){
                map.put("brown", 1);
            } else if(a[i] <= 1199){
                map.put("green", 1);
            } else if(a[i] <= 1599){
                map.put("mizu", 1);
            } else if(a[i] <= 1999){
                map.put("blue", 1);
            } else if(a[i] <= 2399){
                map.put("yellow", 1);
            } else if(a[i] <= 2799){
                map.put("orange", 1);
            } else if(a[i] <= 3199){
                map.put("red", 1);
            } else {
                if(map.containsKey("all"))
                    map.put("all", map.get("all") + 1);
                else
                    map.put("all", 1);
            }
        } a[i] = sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc if(1 <= a[i] && a[i] <= 399){
                map.put("grey", 1);
            } else if(a[i] <= 799){
                map.put("brown", 1);
            } else if(a[i] <= 1199){
                map.put("green", 1);
            } else if(a[i] <= 1599){
                map.put("mizu", 1);
            } else if(a[i] <= 1999){
                map.put("blue", 1);
            } else if(a[i] <= 2399){
                map.put("yellow", 1);
            } else if(a[i] <= 2799){
                map.put("orange", 1);
            } else if(a[i] <= 3199){
                map.put("red", 1);
            } else {
                if(map.containsKey("all"))
                    map.put("all", map.get("all") + 1);
                else
                    map.put("all", 1);
            } 1 <= a[i] && a[i] <= 399 1 <= a[i] 1 a[i] a i a[i] <= 399 a[i] a i 399 {
                map.put("grey", 1);
            } map.put("grey", 1) map.put map "grey" 1 if(a[i] <= 799){
                map.put("brown", 1);
            } else if(a[i] <= 1199){
                map.put("green", 1);
            } else if(a[i] <= 1599){
                map.put("mizu", 1);
            } else if(a[i] <= 1999){
                map.put("blue", 1);
            } else if(a[i] <= 2399){
                map.put("yellow", 1);
            } else if(a[i] <= 2799){
                map.put("orange", 1);
            } else if(a[i] <= 3199){
                map.put("red", 1);
            } else {
                if(map.containsKey("all"))
                    map.put("all", map.get("all") + 1);
                else
                    map.put("all", 1);
            } a[i] <= 799 a[i] a i 799 {
                map.put("brown", 1);
            } map.put("brown", 1) map.put map "brown" 1 if(a[i] <= 1199){
                map.put("green", 1);
            } else if(a[i] <= 1599){
                map.put("mizu", 1);
            } else if(a[i] <= 1999){
                map.put("blue", 1);
            } else if(a[i] <= 2399){
                map.put("yellow", 1);
            } else if(a[i] <= 2799){
                map.put("orange", 1);
            } else if(a[i] <= 3199){
                map.put("red", 1);
            } else {
                if(map.containsKey("all"))
                    map.put("all", map.get("all") + 1);
                else
                    map.put("all", 1);
            } a[i] <= 1199 a[i] a i 1199 {
                map.put("green", 1);
            } map.put("green", 1) map.put map "green" 1 if(a[i] <= 1599){
                map.put("mizu", 1);
            } else if(a[i] <= 1999){
                map.put("blue", 1);
            } else if(a[i] <= 2399){
                map.put("yellow", 1);
            } else if(a[i] <= 2799){
                map.put("orange", 1);
            } else if(a[i] <= 3199){
                map.put("red", 1);
            } else {
                if(map.containsKey("all"))
                    map.put("all", map.get("all") + 1);
                else
                    map.put("all", 1);
            } a[i] <= 1599 a[i] a i 1599 {
                map.put("mizu", 1);
            } map.put("mizu", 1) map.put map "mizu" 1 if(a[i] <= 1999){
                map.put("blue", 1);
            } else if(a[i] <= 2399){
                map.put("yellow", 1);
            } else if(a[i] <= 2799){
                map.put("orange", 1);
            } else if(a[i] <= 3199){
                map.put("red", 1);
            } else {
                if(map.containsKey("all"))
                    map.put("all", map.get("all") + 1);
                else
                    map.put("all", 1);
            } a[i] <= 1999 a[i] a i 1999 {
                map.put("blue", 1);
            } map.put("blue", 1) map.put map "blue" 1 if(a[i] <= 2399){
                map.put("yellow", 1);
            } else if(a[i] <= 2799){
                map.put("orange", 1);
            } else if(a[i] <= 3199){
                map.put("red", 1);
            } else {
                if(map.containsKey("all"))
                    map.put("all", map.get("all") + 1);
                else
                    map.put("all", 1);
            } a[i] <= 2399 a[i] a i 2399 {
                map.put("yellow", 1);
            } map.put("yellow", 1) map.put map "yellow" 1 if(a[i] <= 2799){
                map.put("orange", 1);
            } else if(a[i] <= 3199){
                map.put("red", 1);
            } else {
                if(map.containsKey("all"))
                    map.put("all", map.get("all") + 1);
                else
                    map.put("all", 1);
            } a[i] <= 2799 a[i] a i 2799 {
                map.put("orange", 1);
            } map.put("orange", 1) map.put map "orange" 1 if(a[i] <= 3199){
                map.put("red", 1);
            } else {
                if(map.containsKey("all"))
                    map.put("all", map.get("all") + 1);
                else
                    map.put("all", 1);
            } a[i] <= 3199 a[i] a i 3199 {
                map.put("red", 1);
            } map.put("red", 1) map.put map "red" 1 {
                if(map.containsKey("all"))
                    map.put("all", map.get("all") + 1);
                else
                    map.put("all", 1);
            } if(map.containsKey("all"))
                    map.put("all", map.get("all") + 1);
                else
                    map.put("all", 1); map.containsKey("all") map.containsKey map "all" map.put("all", map.get("all") + 1) map.put map "all" map.get("all") + 1 map.get("all") map.get map "all" 1 map.put("all", 1) map.put map "all" 1 sc.close() sc.close sc int min = 0; min 0 int max = 0; max 0 if(map.size() == 1 && !(map.containsKey("all"))){
            min = 1;
            max = 1;
        } else if(map.size() == 1){
            min = 1;
            max = map.get("all");
        }else{
            for(String key: map.keySet()){
                if(key.equals("all")){
                    max += map.get(key);
                } else {
                    min += map.get(key);
                    max += map.get(key);
                }
            }
        } map.size() == 1 && !(map.containsKey("all")) map.size() == 1 map.size() map.size map 1 !(map.containsKey("all")) (map.containsKey("all")) map.containsKey map "all" {
            min = 1;
            max = 1;
        } min = 1 min 1 max = 1 max 1 if(map.size() == 1){
            min = 1;
            max = map.get("all");
        }else{
            for(String key: map.keySet()){
                if(key.equals("all")){
                    max += map.get(key);
                } else {
                    min += map.get(key);
                    max += map.get(key);
                }
            }
        } map.size() == 1 map.size() map.size map 1 {
            min = 1;
            max = map.get("all");
        } min = 1 min 1 max = map.get("all") max map.get("all") map.get map "all" {
            for(String key: map.keySet()){
                if(key.equals("all")){
                    max += map.get(key);
                } else {
                    min += map.get(key);
                    max += map.get(key);
                }
            }
        } for(String key: map.keySet()){
                if(key.equals("all")){
                    max += map.get(key);
                } else {
                    min += map.get(key);
                    max += map.get(key);
                }
            } String key map.keySet() map.keySet map {
                if(key.equals("all")){
                    max += map.get(key);
                } else {
                    min += map.get(key);
                    max += map.get(key);
                }
            } {
                if(key.equals("all")){
                    max += map.get(key);
                } else {
                    min += map.get(key);
                    max += map.get(key);
                }
            } if(key.equals("all")){
                    max += map.get(key);
                } else {
                    min += map.get(key);
                    max += map.get(key);
                } key.equals("all") key.equals key "all" {
                    max += map.get(key);
                } max += map.get(key) max map.get(key) map.get map key {
                    min += map.get(key);
                    max += map.get(key);
                } min += map.get(key) min map.get(key) map.get map key max += map.get(key) max map.get(key) map.get map key 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[]){
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int[] a = new int[N];
        Map<String, Integer> map = new HashMap<>();
        for(int i = 0; i < N; i++){
            a[i] = sc.nextInt();
            if(1 <= a[i] && a[i] <= 399){
                map.put("grey", 1);
            } else if(a[i] <= 799){
                map.put("brown", 1);
            } else if(a[i] <= 1199){
                map.put("green", 1);
            } else if(a[i] <= 1599){
                map.put("mizu", 1);
            } else if(a[i] <= 1999){
                map.put("blue", 1);
            } else if(a[i] <= 2399){
                map.put("yellow", 1);
            } else if(a[i] <= 2799){
                map.put("orange", 1);
            } else if(a[i] <= 3199){
                map.put("red", 1);
            } else {
                if(map.containsKey("all"))
                    map.put("all", map.get("all") + 1);
                else
                    map.put("all", 1);
            }
        }
        sc.close();

        int min = 0;
        int max = 0;
        if(map.size() == 1 && !(map.containsKey("all"))){
            min = 1;
            max = 1;
        } else if(map.size() == 1){
            min = 1;
            max = map.get("all");
        }else{
            for(String key: map.keySet()){
                if(key.equals("all")){
                    max += map.get(key);
                } else {
                    min += map.get(key);
                    max += map.get(key);
                }
            }
        }
        System.out.println(min + " " + max);
    }
} public class Main{

    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int[] a = new int[N];
        Map<String, Integer> map = new HashMap<>();
        for(int i = 0; i < N; i++){
            a[i] = sc.nextInt();
            if(1 <= a[i] && a[i] <= 399){
                map.put("grey", 1);
            } else if(a[i] <= 799){
                map.put("brown", 1);
            } else if(a[i] <= 1199){
                map.put("green", 1);
            } else if(a[i] <= 1599){
                map.put("mizu", 1);
            } else if(a[i] <= 1999){
                map.put("blue", 1);
            } else if(a[i] <= 2399){
                map.put("yellow", 1);
            } else if(a[i] <= 2799){
                map.put("orange", 1);
            } else if(a[i] <= 3199){
                map.put("red", 1);
            } else {
                if(map.containsKey("all"))
                    map.put("all", map.get("all") + 1);
                else
                    map.put("all", 1);
            }
        }
        sc.close();

        int min = 0;
        int max = 0;
        if(map.size() == 1 && !(map.containsKey("all"))){
            min = 1;
            max = 1;
        } else if(map.size() == 1){
            min = 1;
            max = map.get("all");
        }else{
            for(String key: map.keySet()){
                if(key.equals("all")){
                    max += map.get(key);
                } else {
                    min += map.get(key);
                    max += map.get(key);
                }
            }
        }
        System.out.println(min + " " + max);
    }
} Main
import java.util.*;
 
public class Main{

    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int[] a = new int[N];
        Map<String, Integer> map = new HashMap<>();
        for(int i = 0; i < N; i++){
            a[i] = sc.nextInt();
            if(1 <= a[i] && a[i] <= 399){
                map.put("grey", 1);
            } else if(a[i] <= 799){
                map.put("brown", 1);
            } else if(a[i] <= 1199){
                map.put("green", 1);
            } else if(a[i] <= 1599){
                map.put("mizu", 1);
            } else if(a[i] <= 1999){
                map.put("blue", 1);
            } else if(a[i] <= 2399){
                map.put("yellow", 1);
            } else if(a[i] <= 2799){
                map.put("orange", 1);
            } else if(a[i] <= 3199){
                map.put("red", 1);
            } else {
                if(map.containsKey("all"))
                    map.put("all", map.get("all") + 1);
                else
                    map.put("all", 1);
            }
        }
        sc.close();

        int min = 0;
        int max = 0;
        if(map.size() == 1 && !(map.containsKey("all"))){
            min = 1;
            max = 1;
        } else if(map.size() == 1){
            min = 1;
            max = map.get("all");
        }else{
            for(String key: map.keySet()){
                if(key.equals("all")){
                    max += map.get(key);
                } else {
                    min += map.get(key);
                    max += map.get(key);
                }
            }
        }
        System.out.println(min + " " + max);
    }
}